Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Google cloud sql instance infinite loading on restart

We have google cloud sql instance with around 10.000 databases. Time to time mysql instance becomes unresponsive, so all we can do is just restart from the google console. (The reasons why it becomes unresponsive are not known currently :( )

Today we had similar issue, and we tried to restart it and now it is already restarting for more than an hour (usually it takes around 2 minutes to restart)

What can be done ???

like image 945
ArmeniaH Avatar asked Dec 21 '25 11:12

ArmeniaH


1 Answers

Google cloud sql has limitation of 600 seconds on a query to run, after which a deadlock was caused. The deadlock can be opened by their technicians in 24 hours (this is in sane if you are on production with lots of users ...)

Their answer

Your CloudSQL instance is now back up and running, it appears that the server crashed and caused corruption at 8:02:22 PST on Feb 10th (Today).

The main reason given is: 2017-02-10T16:02:22.555549Z 0 [ERROR] [FATAL] InnoDB: Semaphore wait has lasted > 600 seconds. We intentionally crash the server because it appears to be hung.

It appears that the instance had a lock that was held for more than 5 minutes and innodb crashed the server because of that. It's possible there was a deadlock happening.

In order to prevent this in the future we recommend looking over your current queries to see if any could cause a deadlock.

like image 156
ArmeniaH Avatar answered Dec 23 '25 01:12

ArmeniaH



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!