Hi,

I'm occasionally getting Sequel::DatabaseError: Mysql::Error: Lost
connection to MySQL server during query
when running with sequel + sinatra + passenger 3.

Reading around there seem to be two possibilities for this:

* It is just a standard timeout for mysql
* It is caused by the connection being used simultaneously.

I can't see a "reconnect" option in the mysql adapter like in
activerecord, despite this 
http://code.google.com/p/ruby-sequel/issues/detail?id=26
saying it is fixed in trunk, nor can I see the MYSQL_OPT_RECONNECT
being used anywhere, so is it the case that sequel cannot currently
set this option? If so, will you welcome a patch to support this?

The other possibility is that this is caused by passenger spawning new
workers or somesuch. The db connection is currently kept in a global
DB constant, which is defined in the config.ru file - should I instead
be connecting every time a request comes through (seems unlikely) or
performing some voodoo to reset the connection when passenger spawns
new workers somehow?

Any help on this greatly appreciated.

Cheers,
Roland

-- 
You received this message because you are subscribed to the Google Groups 
"sequel-talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sequel-talk?hl=en.

Reply via email to