http://www.perlmonks.org?node_id=169295


in reply to MySQL has gone away

You sometimes get this with a heavily loaded SQL server, not just MySQL. If the connection between your script and MySQL gets dropped... well...

What you can do sneakily is abstract it a bit, and if MySQL dies on you, you can catch it, sleep 60, and then try to reconnect silently. If it dies on the reconnect, then you got real trouble you need to die or croak on.

--
$Stalag99{"URL"}="http://stalag99.keenspace.com";