4

我的 GAE 任务队列请求之一超出了软内存限制(日志如下)。我对软内存限制的理解是它让请求完成,然后在完成后关闭实例。

但是,从日志看来,当我达到软内存限制时,执行停止了。在内存限制消息之后,我看不到更多的日志记录代码,并且我检查了我的状态,它看起来不像请求正在完成。我不确定它是否重要,但这个请求是在延迟库 TaskQueue 中执行的。

那么,如果 TaskQueue 达到软私有内存限制,执行会继续执行直到请求完成还是立即停止?是否可能不再记录仅记录代码?

日志:

2012-04-11 23:45:13.203
Exceeded soft private memory limit with 145.848 MB after servicing 3 requests total
W 2012-04-11 23:45:13.203
After handling this request, the process that handled this request was found to be using too much memory and was terminated. This is likely to cause a new process to be used for the next request to your application. If you see this message frequently, you may have a memory leak in your application.

日志截图

4

2 回答 2

7

这里发生的是最后的处理程序检查内存状态,如果它超过限制,它将记录一个错误并关闭实例。
由于任务已成功完成(您可以看到它以状态 200 终止)它不会重试它。

当处理程序执行期间内存状态远高于内存限制时,处理程序将关闭实例并返回错误 500,在这种情况下任务将重试。

于 2012-04-12T05:15:51.493 回答
-1

根据我的经验:如果您的实例达到软内存命中,您的请求仍然会完成,但响应状态将为 500。

于 2012-04-12T05:09:19.117 回答