[Mongrel] Troubleshooting unresponsive mongrel
alexey.verkhovsky at gmail.com
Wed May 23 11:21:36 EDT 2007
On 5/23/07, Morten <lists at kikobu.com> wrote:
> Hi. I have mongrel 1.0.1 running a really simple application and found
> to lock up (rarely, but still).
Does it lock up after a period of inactivity? Are you using MySQL pure
Ruby driver there? If the answer is yes and yes, it's a known MySQL
driver bug. Quoting from Mongrel FAQ:
Q: Mongrel stops working if it's left alone for a long time.
If you find that Mongrel stops working after a long idle time and
you're using MySQL then you're hitting a bug in the MySQL driver that
doesn't properly timeout connections. What happens is the MySQL server
side of the connection times out and closes, but the MySQL client
doesn't detect this and just sits there.
What you have to do is set:
ActiveRecord::Base.verification_timeout = 14400
Or to any value that is lower than the MySQL server's
interactive_timeout setting. This will make sure that ActiveRecord
checks the connection often enough to reset the connection.
More information about the Mongrel-users