1

I'm trying to deploy a Nodejs8, memory intense app on Google App Engine Standard.

This is my app.yaml:

runtime: nodejs8
resources:
  cpu: 1
  memory_gb: 6
  disk_size_gb: 10

This is my deploy command:
gcloud app deploy --project=my-project --version=0-0-12

This is the error I get when I try to access the relevant endpoint of the app:
Exceeded soft memory limit of 128 MB with 182 MB after servicing 0 requests total. Consider setting a larger instance class in app.yaml.

How come the memory_gb param is ignored? What do I need to do in order to enlarge the memory of the instances?

4

1 回答 1

1

您正在尝试将灵活的环境资源设置用于标准环境app.yaml文件,但这是行不通的。请注意,在大多数情况下,无效设置将被忽略,因此您需要小心。

对于标准环境,您无法明确选择单个资源,您只能使用Runtime 和 app 元素instance_class中的选项:

实例类

可选的。此服务的实例类

以下值可用,具体取决于您的服务的 扩展

注意:如果instance_class设置为F2或更高,您可以通过将max_concurrent_requests设置为高于 10(默认值)的值来优化您的实例。要找到最佳值,请逐渐增加它并监控应用程序的性能。

当前支持的标准环境实例类中可用的最大内存量为 1G,如果您确实需要 6G,则必须迁移到柔性环境。

旁注:可能有用:如何判断 Google App Engine 文档页面适用于标准环境还是柔性环境

于 2018-10-31T13:09:16.183 回答