#86 ✓invalid
ronin-16982 (at lighthouseapp)

MySQL connections not closed on restart

Reported by ronin-16982 (at lighthouseapp) | October 27th, 2008 @ 07:23 AM | in 1.1

Following setup:

thin 1.0.0 mysql 2.7 (the gem) rails 2.2 RC 1

How to reproduce it: * Take a rails app connected to a mysql database * Start thin as daemon * Make a request which uses the database * Restart thin with 'thin restart'

Expected result: No open database connection

Actual result: 1 open database connection

(I watched the connections with the MySQL Administrator app)

When you repeat that several times, you end up with many stale database connections. This makes it easy to hit the max connections limit on a server and could crash the whole app because newly restarted thins may not be able to connect to the database any more.

Doing this with mongrel, the database connections are closed properly on 'mongrel_rails restart'.

Possible workaround: Perform a 'thin stop' and start the server again.

Comments and changes to this ticket

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

People watching this ticket