hack to recover on failed mysql connection