如何将 Google 应用引擎的“软内存限制”增加到 2GB 以上

bar*_*ker 1 python memory google-app-engine google-cloud-platform

我使用此应用程序 yaml 文件超出了 google 应用程序引擎中的软内存限制(4 到 6 GB,软限制设置为 2GB):

runtime: python37
service: snow
instance_class: F4_1G
resources:
  cpu: 1
  memory_gb: 16
  disk_size_gb: 20
Run Code Online (Sandbox Code Playgroud)

看来资源 memory_gb 与“软限制”内存无关。启动我的应用程序时,我需要训练一个需要大约 4 到 6GB 内存的 ML 模型。有没有其他方法可以在应用程序部署期间增加内存?

JKl*_*nne 5

这是因为您正在尝试在 App Engine Standard 中配置资源设置。资源部分只能在 App EngineFlexible [1] 中进行配置。我建议添加env: flexapp.yaml 使其生效。

[1] https://cloud.google.com/appengine/docs/flexible/custom-runtimes/configuring-your-app-with-app-yaml#resource-settings