We are running on Google Compute Engine/Debian9/PHP/Lumen/Doctrine2 <-> Google SQL MySQL 2nd Gen 5.7.
Usually it works without hiccups, but we are now getting error messages, similar to the one below, with increasing frequency:
Error while sending QUERY packet. PID=123456
PDOStatement::execute(): MySQL server has gone away
Any idea why this is happening and how i would fix it?
As noted here, there is a list of cases which may be causing this error. A few are:
Please refer to the link for a complete list.
Also, there see this answers on the same problem.