3
votes

We have an issue With Google Cloud SQL (Second Generation).

Most inserts are failing with the following error:

The MySQL server is running with the --read-only option so it cannot execute this statement.

We have made no changes. This suddenly started happening. Tried restarting the Google Cloud SQL instance but it had no effect.

Any suggestions on how we might fix quickly?

3
Not all inserts are failing. Failure rate appears to be linked to connecting server location with Europe and Asia very badly affect. - Michael Gardiner
We've started having this issue as well. Working on submitting a high priority ticket to them now. - RLHawk
It appears that it's randomly sending traffic to our failover replica, which is read only. - RLHawk
Yes, this is what I am seeing also. Interestingly this is not happening to a server I have in us-central1-b - this server is working fine. - Michael Gardiner
Have you heard anything back from Google? I emailed [email protected] over 2 hours ago and had nothing back. I'm considering deleting the failover replica to see if it resolves the issue. - Michael Gardiner

3 Answers

2
votes

Google have fixed the problem. Their response was:

We had a problematic configuration that was directing traffic to both master and replica. The changes should have been reverted and you shouldn't see this issue anymore.

0
votes

I deleted the failover replica and after a few seconds it works well again. It seems that it was a problem with the replica readonly message.

0
votes

Unfortunately, this seems to happen from time to time on Google CloudSQL. We've configured an alarm that listens to this error in our logs and after restarting the application it usually starts working again.