Project

General

Profile

Actions

Defect #4144

closed

Setting timeout to avoid bug in MySQL driver that causes Mongrel stopping to work after a long idle time

Added by Vadim Epstein about 15 years ago. Updated almost 15 years ago.

Status:
Closed
Priority:
Normal
Category:
Database
Target version:
-
Start date:
2009-10-30
Due date:
% Done:

0%

Estimated time:
Resolution:
Wont fix
Affected version:

Description

Hi,

Mongrel stop working after a long idle time because of bug in 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. As a result Mongrel stops responing until its restart.

The problem is discussed here:
http://www.redmine.org/boards/2/topics/9292

What is necessary to do is to 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.

I don't know Ruby. Is there any way to patch this myself or shall I wait for the future Redmine release?

Actions

Also available in: Atom PDF