You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We are having this issue after an extended period of inactivity, usually overnight, where when the first query after this period is throwing this error Warning: PDOStatement::execute(): MySQL server has gone away
We put in a fix for this by closing and reopening the database connection but this just threw a new issue after the inactivity of Warning: Error while sending QUERY packet.
Has anyone had this before or know of a fix for this? It looks like it is happening after the 8 hour wait_timout in mysql.
I have also seen there is a cleanup function in the WampKernel that looks like it should be resetting the connections?
Thanks
The text was updated successfully, but these errors were encountered:
If you're using Doctrine, you can use the following: $em = $this->doctrine->getManager(); $dbalConn = $em->getConnection(); if (!$dbalConn->ping()) { $dbalConn->close(); $dbalConn->connect(); }
I had the same issue and the ping() test fixed it. You just need to figure out where to place the test, like an entry point. I use it in an authentication provider (JWT), because all requests triggering connections to MySQL are passing through that method.
Hi,
We are having this issue after an extended period of inactivity, usually overnight, where when the first query after this period is throwing this error
Warning: PDOStatement::execute(): MySQL server has gone away
We put in a fix for this by closing and reopening the database connection but this just threw a new issue after the inactivity of
Warning: Error while sending QUERY packet.
Has anyone had this before or know of a fix for this? It looks like it is happening after the 8 hour wait_timout in mysql.
I have also seen there is a cleanup function in the WampKernel that looks like it should be resetting the connections?
Thanks
The text was updated successfully, but these errors were encountered: