App Engine Standard Nodejs8 忽略资源中的 memory_gb
App Engine Standard Nodejs8 ignore memory_gb in resources
我正在尝试在 Google App Engine Standard 上部署 Nodejs8、内存密集型应用程序。
这是我的 app.yaml
:
runtime: nodejs8
resources:
cpu: 1
memory_gb: 6
disk_size_gb: 10
这是我的部署命令:
gcloud app deploy --project=my-project --version=0-0-12
这是我在尝试访问应用程序的相关端点时遇到的错误:
Exceeded soft memory limit of 128 MB with 182 MB after servicing 0 requests total. Consider setting a larger instance class in app.yaml.
为什么 memory_gb
参数被忽略了?我需要做什么来扩大实例的内存?
您正在尝试使用 灵活 环境 Resource settings into a standard environment app.yaml
file,这不起作用。请注意,在大多数情况下,无效的设置将被静默忽略,因此您需要小心。
对于标准环境,您不能显式选择个别资源,只能使用Runtime and app elements中的instance_class
选项:
instance_class
Optional. The instance class for this service.
The following values are available depending on your service's
scaling:
Automatic scaling
F1, F2, F4, F4_1G
Default: F1 is assigned if you do not specify an instance class along with the automatic_scaling element.
Basic and manual scaling
B1, B2, B4, B4_1G, B8
Default: B2 is assigned if you do not specify an instance class along with the basic_scaling element or the
manual_scaling element.
Note: If instance_class is set to F2 or higher, you can optimize your instances by setting max_concurrent_requests to a
value higher than 10, which is the default. To find the optimal value,
gradually increase it and monitor the performance of your application.
当前支持的标准环境实例最大可用内存类为1G,如果您确实需要6G,则必须迁移到灵活环境。
旁注:可能有用:
我正在尝试在 Google App Engine Standard 上部署 Nodejs8、内存密集型应用程序。
这是我的 app.yaml
:
runtime: nodejs8 resources: cpu: 1 memory_gb: 6 disk_size_gb: 10
这是我的部署命令:
gcloud app deploy --project=my-project --version=0-0-12
这是我在尝试访问应用程序的相关端点时遇到的错误:
Exceeded soft memory limit of 128 MB with 182 MB after servicing 0 requests total. Consider setting a larger instance class in app.yaml.
为什么 memory_gb
参数被忽略了?我需要做什么来扩大实例的内存?
您正在尝试使用 灵活 环境 Resource settings into a standard environment app.yaml
file,这不起作用。请注意,在大多数情况下,无效的设置将被静默忽略,因此您需要小心。
对于标准环境,您不能显式选择个别资源,只能使用Runtime and app elements中的instance_class
选项:
instance_class
Optional. The instance class for this service.
The following values are available depending on your service's scaling:
Automatic scaling
F1, F2, F4, F4_1G
Default: F1 is assigned if you do not specify an instance class along with the automatic_scaling element.
Basic and manual scaling
B1, B2, B4, B4_1G, B8
Default: B2 is assigned if you do not specify an instance class along with the basic_scaling element or the manual_scaling element.
Note: If instance_class is set to F2 or higher, you can optimize your instances by setting max_concurrent_requests to a value higher than 10, which is the default. To find the optimal value, gradually increase it and monitor the performance of your application.
当前支持的标准环境实例最大可用内存类为1G,如果您确实需要6G,则必须迁移到灵活环境。
旁注:可能有用: