Wednesday, January 18, 2017

[google-cloud-sql-discuss] Cloud SQL periodic issues connecting OperationalError: (2062, 'Cloud SQL socket open failed with error: Transport endpoint is not connected')

Periodically connection attempts to the 2nd Gen MySQL server receives this error:


OperationalError: (2062, 'Cloud SQL socket open failed with error: Transport endpoint is not connected')


This will persist for ~10 minutes and then go away. It also seems to happen at the same time every day (across 3 different projects that all access the same server it'll happen for the first time within 2 minutes).


The only reference to this error in conjunction with Cloud SQL I could find is that it may be related to connection limits (https://groups.google.com/d/msg/google-cloud-sql-discuss/sdeD17oDBOQ/wtTewl4-EgAJ) but there is very little else going on with the instance outside of one TaskQueue task so I find it unlikely we're hitting even the 12 per-instance limit (and definitely not the 4k overall limit).


The code that causes this exception uses the same DB settings as the rest of the app and is simply trying toSELECT a row by primary key (so a small query).

In the DB logs there are a lot of entries of this error:


[Note] Aborted connection 39643 to db: 'my_schema' user: 'root' host: 'cloudsqlproxy~<instance_ip>' (Got an error reading communication packets)


but I'm not sure if they're related as they occur pretty consistently throughout the day and the above error only occurs at a certain time for ~10 minutes.

This only started after upgrading to 2nd Gen Cloud SQL.


Any insights on this? Is there some sort of instance maintenance that may be causing this?


Thanks!

--
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/a9dc8323-cfc4-4a4e-92c1-8b0cfb4e08aa%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment