On Tue, Jan 6, 2015 at 2:17 AM, Jeremy Evans <[email protected]> wrote:
> There's nothing specifically logged when a connection is disconnected and a
> new connection is made.  But it's fairly easy to add such logging yourself:
>
> def DB.disconnect_connection(conn)
>   super
>   log_info("Disconnecting connection #{conn.object_id}")
> end
>
> def DB.connect(server)
>   conn = super
>   log_info("Creating new connection #{conn.object_id}")
>   conn
> end
>
> Thanks,
> Jeremy

I just realized that all those disconnected connections almost
sharing the same object_id. I think this didn't prove that the
connection was shared amongst processes, but I guess this
highly suggested the possibility, therefore I tried to turn off
preload_app.

Not too surprising but this still surprised me! The problem was
gone. So somehow there's still a connection sneaked in Unicorn's
master process and got copied over the workers.

I don't understand how this got in because I did verify that
in the after_fork hook provided in Unicorn, the size of the
connection pool was really 0 amongst all the workers and
in the master in before_fork.

I am worried that using preload_app=false would get us some
troubles by hitting the memory limit soon, but... anyway...

Would keep you posted after I got more clues.

-- 
You received this message because you are subscribed to the Google Groups 
"sequel-talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sequel-talk.
For more options, visit https://groups.google.com/d/optout.

Reply via email to