Friday, June 25, 2021

[google-cloud-sql-discuss] Re: Getting pymysql.err.OperationalError: (2013, 'Lost connection to MySQL server during query')

Hello,

You can check this documentation [1] that explains the three different causes of this error and the possible solutions for each case.

[1] https://dev.mysql.com/doc/refman/5.7/en/error-lost-connection.html

On Thursday, June 24, 2021 at 9:02:53 AM UTC+2 mike.b...@puzzle.consulting wrote:
I am running a Python script in a GCP Compute Engine VM to connect to the MySQL instance, and I am getting this error. I am using pymysql for connection. I tracked the error to this file 
`/usr/local/lib/python3.5/dist-packages/pymysql/connections.py` line 703, in _read_bytes and to the following lines of code

```
if len(data) < num_bytes:
        self._force_close()
        raise err.OperationalError(
        CR.CR_SERVER_LOST, "Lost connection to MySQL server during query")
```

Has anyone experienced this issue before?

--
You received this message because you are subscribed to the Google Groups "Google Cloud SQL discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-cloud-sql-discuss+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-cloud-sql-discuss/0fd1cc0e-650f-4b6f-a1be-f754c401e1bdn%40googlegroups.com.

No comments:

Post a Comment