Better handling for when the MySQL server goes away