Fix to hopefully prevent mysql connection timeouts