Cloud 运行 在 121 秒后崩溃

Cloud Run crashes after 121 seconds

我正在触发一个带有 PubSub 主题和订阅触发器的长 运行ning 抓取云 运行 函数。每次我 运行 它都会在 121.8 秒后崩溃,但我不明白为什么。

POST 503 556B 121.8s APIs-Google; (+https://developers.google.com/webmasters/APIs-Google.html) https://????.a.run.app/

The request failed because either the HTTP response was malformed or connection to the instance had an error.

我有一个内置超时触发器,当我将它设置为 1 分钟时,函数 运行s 没有任何问题,但是当我设置为 2 分钟时,上述错误被触发,所以它必须是与云 运行 或订阅超时设置相关的内容,但我已尝试增加这些设置(阅读下文了解更多信息)。

涉及的东西

1 x 云 运行 1 x SubPub 订阅 1 x SubPub 主题

这些是我检查过的东西

谁能给我指出正确的方向?

这几乎可以肯定是由于 Node.js' 默认服务器超时 120 秒。

尝试server.setTimeout(0)删除此超时。