Wednesday, June 23, 2021

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

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/14c179b9-dcb6-44ad-8b27-f2aee04adb17n%40googlegroups.com.

No comments:

Post a Comment