
08-30-2009, 03:46 PM
|
|
LiteSpeed Staff
|
|
Join Date: May 2003
Location: New Jersey
Posts: 7,590
|
|
Mysql connection was not closed before ruby process forked, so if one process close the connection, the other processes will get the error.
To verify this, you can "lsof -p <pid_of_ruby_process>", check the mysql unix socket, all of them must be referencing to the same one, and the parent ruby process should not have it opened.
In lsws/fcgi-bin/RailsRunner.rb, we have code tries to close MySQL connections after initialization
Quote:
|
ActiveRecord::Base.clear_active_connections! if defined?(ActiveRecord::Base)
|
Seems it works for one version of Rails, then stop working for another. If you can figure out the right way to close MySQL DB connection, we will update RailsRunner.rb
|