Finally reverted timeout routine for MySQL