【发布时间】:2021-03-11 09:17:41
【问题描述】:
我有一个小型 NodeJS 应用程序后端,它为在标准 GAE 环境中运行的 React 前端提供服务,该环境没有实际负载 - 它仅在我测试内容时满足我的个人请求。
所以我在前端应用程序中单击了大约一个小时,昨晚向后端发送了一些请求,然后突然弹出以下错误消息:
Request was aborted after waiting too long to attempt to service your request.
这些是我的日志:
2021-03-11 06:30:06.228 CET GET /l/data 200
Api call succeeded. Returning data.
2021-03-11 06:30:52.859 CET
[start] 2021/03/11 05:30:52.858446 Quitting on terminated signal
2021-03-11 06:31:25.997 CET OPTIONS /l/orders 500
Request was aborted after waiting too long to attempt to service your request.
2021-03-11 06:31:41.132 CET OPTIONS /l/orders 500
Request was aborted after waiting too long to attempt to service your request.
2021-03-11 06:31:46.629 CET OPTIONS /l/orders 500
Request was aborted after waiting too long to attempt to service your request.
2021-03-11 06:34:44.566 CET GET /l/users 200
2021-03-11 06:34:44.736 CET
[start] 2021/03/11 05:34:44.735240 No entrypoint specified, using default entrypoint: /serve
[start] 2021/03/11 05:34:44.736120 Starting app
从日志中,我看到我之前的实例在触发错误的请求之前已停止,而对于新的 OPTIONS 请求,GAE 甚至没有尝试启动实例。大约 3 分钟后触发了下一次启动。
我仍然不确定这里发生了什么并想了解它,因为我在 GAE 上运行了一些生产服务,这让我有点担心。
这是我的 app.yaml:
runtime: nodejs12
handlers:
- url: .*
secure: always
redirect_http_response_code: 301
script: auto
service: backend
automatic_scaling:
max_instances: 2
instance_class: F4
提前致谢!
【问题讨论】:
标签: google-app-engine google-cloud-platform