接收Google Cloud Endpoints 204在关机前无内容 - 重启

时间:2022-07-20 23:11:39

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.

我在App Engine(Java)上有一个应用程序,后面有一个Cloud SQL数据库。我的移动应用程序通过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.

问题是,当我将实例空闲很长时间时,下次我在端点上发出请求时(即使在浏览器中使用简单的GET请求/ Chrome中的邮递员),我几乎总是得到一个204 No Content背部。应用引擎日志似乎正常。但是,一旦我关闭实例,并再次执行请求,我总是得到我需要的响应JSON。

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.

此外,一旦它做出响应,它会一直响应,直到我让它闲置一段时间。然后我经常得到一个HTTP 204。

Any advice?

任何建议?

接收Google Cloud Endpoints 204在关机前无内容 - 重启

1 个解决方案

#1


1  

Please take a look at this FAQ - https://developers.google.com/cloud-sql/faq#sometimes_slow

请查看此常见问题解答 - https://developers.google.com/cloud-sql/faq#sometimes_slow

#1


1  

Please take a look at this FAQ - https://developers.google.com/cloud-sql/faq#sometimes_slow

请查看此常见问题解答 - https://developers.google.com/cloud-sql/faq#sometimes_slow