Google's Cloud MySQL shuts down after 15 minutes. Why? -


we using google's cloud mysql service. after 15 minutes seems shut down or go sleep.

this activity directly relates settings of "on demand" , "per use" selections. have ensured these set "always on" , "package" upon creation of service.

what occurs - after approximately 15 minutes of inactivity on mysql service attempt make query. first query takes approximately 10 seconds issue response. following queries respond within normal response times.


we utilizing d1 tier.

possibilities - tier possible low of resources make above settings effective?


any suggestions ensure mysql service google running , not in type of idle mode?

pinging mysql server every 14 minutes possibility seems google have ability handle themselves.

unfortunately not able diagnose direct problem enough, had move forward. solved problem adding connection ping every 7 minutes keep connection alive.

hope below helps someone. written within nodejs. concept should universal.

var keepalive = function() {   pool.getconnection(function(err, connection) {     if(err) { console.log(err) }      connection.ping(function (err) {       if (err) throw err;       console.log('server responded ping');       connection.release();     });   }); };  setinterval(function(){keepalive();}, 420000); 

Comments

Popular posts from this blog

powershell Start-Process exit code -1073741502 when used with Credential from a windows service environment -

twig - Using Twigbridge in a Laravel 5.1 Package -

c# - LINQ join Entities from HashSet's, Join vs Dictionary vs HashSet performance -