问题
I have observed multiple times the google cloud sql getting down and coming back after some time.
Please find attached the screen shot below of the No. of read write operations from which I am identifying this issue. (Unable to attach image as it is asking 10 reputations, I don't know where to get it from, I can email if required)
My typical write operations would be between 12 to 15 writes per second. I have marked in two instances where the db was down (zero write operations) and the system coming back after 30 mins or so.
This has happened twice today morning (IST) between 1:05 to 1:30 and 3:50 to 4:20 (IST)
Last week too I have noticed this issue where the MYSQL was down for some time.
Any specific reason why this is happening?
If MYSQL was down, why did the Google Cloud SQL failover did not take over?
Thanks, Narayana Swamy![enter image description here][1]
回答1:
I have been having the same issue for about a year. Last week I think I found a fix!
In your console click the project, on the left side click Storage > CloudSQL then click on your database name. You will see an 'Edit' button on top. Click that and scroll down to Activation Policy, change it to Always On and then click save. Your DB should now be good to go!
Best of luck
回答2:
There are a few common causes that you might cause you to see restarts:
- If you have set the activation policy to "on demand" the instance will be shut down after being idle for approximately 15 minutes.
- If you change settings such as tier you instance may be restarted.
- As mentioned on the Cloud SQL FAQ Google occasionally restarts instances for maintanance. Given you question and comments on user1156994's answer this seems to be the most likely cause.
来源:https://stackoverflow.com/questions/28169646/google-cloud-sql-shutting-down-intermittently