GCP MySQL server has gone away (Google SQL MySQL 2nd Gen 5.7)

痞子三分冷 提交于 2019-12-24 02:23:58

问题


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?


回答1:


As noted here, there is a list of cases which may be causing this error. A few are:

  • You have encountered a timeout on the server side and the automatic reconnection in the client is disabled (the reconnect flag in the MYSQL structure is equal to 0).
  • You can also get these errors if you send a query to the server that is incorrect or too large...An INSERT or REPLACE statement that inserts a great many rows can also cause these sorts of errors.

. . .

Please refer to the link for a complete list.

Also, there see this answers on the same problem.



来源:https://stackoverflow.com/questions/47857403/gcp-mysql-server-has-gone-away-google-sql-mysql-2nd-gen-5-7

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!