Periodically my application (a faceless daemon, so there's no
human-interface considerations) gets the following exception:
Mysql::Error: MySQL server has gone away: SELECT * FROM `messages` WHERE
(`messages`.`disposition` IS NULL) ORDER BY senttime
(ActiveRecord::StatementInvalid)
I've concluded this is an inevitable vicissitude of our MySQL server
setup. I'm now catching the exception. My question is what I should do
once I catch it.
I am sleeping for 5 minutes and retrying the find(). Is this enough?
Or should I re-run ActiveRecord::Base.establish_connection as well?
It's a naive question, but I'm naive about databases.
— F
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: 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/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---