I've got an application on App Engine (Java) with a Cloud SQL db behind it. My mobile app connects with it via Google Cloud Endpoints.
The issue is, that when I leave an instance idle for a long time, the next time I do a request on an endpoint (even with a simple GET request in the browser/Postman in Chrome), I almost always get a 204 No Content back. The app engine logs just seems normal. However, once I shutdown the instance, and do the request again, I always get the response JSON i need.
Furthermore, once it DOES respond, it keeps responding until I leave it idle for a longer period. Then again I often get a HTTP 204.
Any advice?
Please take a look at this FAQ - https://developers.google.com/cloud-sql/faq#sometimes_slow