prevent "Mysql server has gone away" error