【问题标题】:Google App Engine randomly stops executingGoogle App Engine 随机停止执行
【发布时间】:2021-08-26 09:47:08
【问题描述】:

我已尝试为此寻找具体答案,但在任何地方都找不到答案。我有一个运行时间很长(但不是特别密集)的任务,我想每 12 小时运行一次。

我已经设置了运行此代码的 Google App Engine 标准 node.js Express 服务器,并且在本地运行时完美运行。

但是,大约在中途(但完全随机)它失败并显示以下错误消息:

2021-06-09T11:10:02.935685Z [start] 2021/06/09 11:10:02.934508 Quitting on terminated signal 
2021-06-09T11:10:02.951563Z [start] 2021/06/09 11:10:02.951205 Start program failed: user application failed with exit code -1 (refer to stdout/stderr logs for more detail): signal: terminated 
2021-06-09T11:10:10.891535Z [start] 2021/06/09 11:10:10.890652 Quitting on terminated signal 
2021-06-09T11:10:10.997898Z [start] 2021/06/09 11:10:10.997488 Start program failed: user application failed with exit code -1 (refer to stdout/stderr logs for more detail): signal: terminated 

这些是我得到的唯一引用某种错误的日志 - 代码中有大量错误处理,没有一个被触发或记录任何内容。这几乎就像函数在某个时间点超时 - 这让我想知道 Google App Engine 是否有最大执行时间?

有没有更好的方法来做我想做的事情?

【问题讨论】:

    标签: node.js google-app-engine google-cloud-platform


    【解决方案1】:

    Google App Engine 确实有请求的最大超时时间,请参阅 this documentation

    【讨论】:

    • 它也可能超出内存。
    • 这应该会抛出一个特定的错误,表明内存已被超出。 soft memory limit reachediirc...
    • GAE 也会针对超时超时引发特定错误。我们没有看到任何相关错误。
    • @gaefan 这是最大超时,奇怪的是错误没有显示出来,但我没有更改代码,而是更改为基本缩放,一切都开始工作了
    猜你喜欢
    • 2014-03-12
    • 2018-07-03
    • 2022-08-18
    • 1970-01-01
    • 1970-01-01
    • 2019-04-16
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多