[BUGFIX] Added automatic database reconnect (MySQL server has gone away (2006))