GAE:点击“Exceeded soft private memory limit”后执行是否继续?

时间:2012-04-12 04:49:59

标签: python google-app-engine task-queue memory-limit

我的一个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.

Log Screenshot

2 个答案:

答案 0 :(得分:7)

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

执行处理程序时,内存状态高于内存限制,处理程序将关闭实例并返回错误500,此时任务将重试。

答案 1 :(得分:-1)

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