I have a block like so:
begin
# some SQL request
rescue Mysql::Error => e
logputs "Mysql::Error occurred, retrying in 10s: #{e.message}"
sleep 10
retry
end
But when a "Lost connection to MySQL server" error occurred, this block was not able to catch it and retry (the MySQL server was restarted). Any idea how I can properly catch this exception?
Thanks!