I'm including stuff below as I replied to author by accident.

Jeremy, you were right.  mysql2's default wait_timeout is 24.9 days, and 
firewall was killing the idle process.  Lowering the wait_timeout to 600 
seconds did indeed resolve the issue.

Thanks!
Joseph Shin

On Sat, Nov 30, 2013 at 7:17 AM, Joseph Shin <[email protected]>
 wrote:

> Hi Jeremy,
>
> Thanks for the quick response.  I initially had preload_app to false when 
> I experienced these issues initially.  It sounds like if I had that to 
> false (which I did), I shouldn't have to deal with any disconnecting in 
> preload_app.
>
> Any other suggestions in tracking down hanging connections?  (I realize 
> I'm being broad here and I apologize, I've just been trying to figure this 
> out for a couple of days.  When I do eventually track it down I will reply 
> to this thread)
>

Note that you replied to me directly instead of sequel-talk.  It's best to 
keep posts on sequel-talk unless there is a reason you don't want them to 
be public.

If you had a 60 second pause even when preload_app is false, it sounds like 
there may be a firewall or something where the packets from the app to the 
database server are being dropped.  You should probably change it so that 
if the tcp connection is dropped, packets are rejected instead of being 
dropped (which should make disconnect detection very fast).  If you can't 
do that, you might be able to use the mysql2 :read_timeout setting to 
decrease the amount of time mysql2 will wait for a response (which will 
still result in slow disconnect detection, but at least faster than 60 
seconds).

Thanks,
Jeremy

-- 
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/groups/opt_out.

Reply via email to