Question

I'm trying Sails.JS with Google Cloud SQL, all seem to work fine, except that after some idle period, the DB seems to go to sleep, timing out on the first request after a long period of time.

Anyone else encountered this, and is there any known solution?

Était-ce utile?

La solution

In order to minimize the amount you are charged for instances on per use billing plans, by default your instance becomes passive if it is not accessed for 15 minutes. The next time it is accessed there will be a short delay while it is activated. You can change this behavior by configuring the activation policy of the instance in the console.

https://developers.google.com/cloud-sql/faq#sometimes_slow

Autres conseils

Focus on the Activation Policy settings per the first answer given. Switching between "Per Use" and "Package Plan" are primarily billing settings. Switch your Activation Policy to "Always On" if you want to prevent the database from throttling down to idle.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top