After updating several parts of my Rails application (Ruby 1.9.2, Rails 3.0.4, Datamapper 1.1.0) and switching to offline mode, we began to receive strange MySQL connection errors, including:
- Field Count Mismatch
- Lost connection to MySQL server during query
- MySQL server is gone
Then I remembered that Passenger processes are being processed, and you need to re-open new connections for things like redis, memcache, etc., or the data stream will be distorted, and I found another post to handle similar adventures from- for the same problem with MySQL.
But I also recalled that here, that the Passenger automatically took care of the connections to the database.
I have two questions:
1) How to inform DataMapper about creating and using a new database connection? And / or:
2) Does the passenger forking automatically or not? For fork sake ...;)
mltsy source share