"mysql server has gone away" errors at database startup (Cloud SQL Gen 1 and PHP app)

124 views
Skip to first unread message

Egy Poluf

unread,
Nov 7, 2017, 1:33:57 PM11/7/17
to Google Cloud SQL discuss
We have been having mysql server has gone away errors in the past week in our PHP 5 app with Generation 1 Cloud SQL.

PHP Warning: mysqli::mysqli(): (HY000/2006): MySQL server has gone away
together with
PHP Warning: mysqli::mysqli(): Error while reading greeting packet. PID=-1

Based on the log analysis this is experienced when the server is being started up, but not every time, and I am not sure if this is the only case. In most cases the app works OK with no such errors.

My hunch is that the database engine does not start up quickly enough and there is a timeout? However, this is something we have just started experiencing and nothing relevant in the PHP script has been changed for a long time.

Please help either with a workaround or with fixing the error.

Thank you.

Kenworth (Google Cloud Platform)

unread,
Nov 7, 2017, 3:50:35 PM11/7/17
to Google Cloud SQL discuss
I noticed that you also posted this in Public Issue Tracker. As it may potentially qualify as a defect report, we will be helping you on the issue tracker created. I recommend community users that experiences the same issue to post their feedback on the issue tracker so proper weight and attention be given to it. Please feel free to update this thread once a resolution has been reached.
Reply all
Reply to author
Forward
0 new messages