mysql server has gone away?

Resurrecting an old but helpful thread just to note for future Googlers that vanek's below solution works in a pinch (even if it might not be the most efficient)-- except "if e.to_s =~/away/" doesn't catch all possible exceptions that can raised by the db connection your forked process closed upon exit. Every so often a forked process will exit in the middle of an in-process db query in the parent, and you'll get a still-uncaught exception, "Lost connection to MySQL server during query". So you should at least do "if e.to_s =~ /has gone away/ or e.to_s =~ /Lost connection/" to catch that one as well.

vanek wrote: