Added a database ping to ensure that we reconnect to MySQL if we lose it