【发布时间】:2018-10-13 11:07:49
【问题描述】:
我将 GAE 用于需要大量内存的繁重任务。我收到以下错误:
Exceeded soft memory limit of 512 MB with 561 MB
after servicing 3 requests total.
Consider setting a larger instance class in app.yaml.
由于任务很昂贵,我假设两个应用程序可以在一个实例中运行。但它不适用于三个应用程序:
While 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 or may be
using an instance with insufficient memory.
Consider setting a larger instance class in app.yaml.
我当前的设置:
runtime: nodejs8
instance_class: B4
basic_scaling:
max_instances: 10
idle_timeout: 1m
我也尝试了这些设置:
runtime: nodejs8
instance_class: F4
automatic_scaling:
target_cpu_utilization: 0.5
max_instances: 10
执行任务失败是“Exceeded soft memory limit”。 所以,为了解决这个错误,我认为横向扩展应该基于“内存利用率”而不是“cpu利用率”。
内存利用率超过限制时如何进行横向扩展?
【问题讨论】: