Python 如何增加谷歌云运行中的内存限制?

Python 如何增加谷歌云运行中的内存限制?,python,flask,google-cloud-platform,containers,google-cloud-run,Python,Flask,Google Cloud Platform,Containers,Google Cloud Run,我正在使用Cloud Run+Cloud Firestore构建一个简单的基于烧瓶的应用程序。有一种方法带来了大量数据,日志显示了此错误: `Memory limit of 244M exceeded with 248M used. Consider increasing the memory limit, see https://cloud.google.com/run/docs/configuring/memory-limits` 如何增加cloudbuild.yaml中的内存限制?我们的

我正在使用Cloud Run+Cloud Firestore构建一个简单的基于烧瓶的应用程序。有一种方法带来了大量数据,日志显示了此错误:

`Memory limit of 244M exceeded with 248M used. Consider increasing the memory limit, see https://cloud.google.com/run/docs/configuring/memory-limits`
如何增加cloudbuild.yaml中的内存限制?我们的YAML文件包含以下内容:

# cloudbuild.yaml
steps:
  # build & push the container image
- name: "gcr.io/kaniko-project/executor:latest"
  args: ["--cache=true", "--cache-ttl=48h", "--destination=gcr.io/$PROJECT_ID/todo:latest"]
  # Deploy container image to Cloud Run
- name: "gcr.io/cloud-builders/gcloud"
  args: ['beta', 'run', 'deploy', 'todo', '--image', 'gcr.io/$PROJECT_ID/todo:latest', '--region', 'us-central1', '--allow-unauthenticated', '--platform', 'managed']

谢谢

在最后一步的参数中,添加
'--memory',512Mi'


大小的格式是一个固定或浮点数,后跟一个单位:G、M或K,分别对应千兆字节、兆字节或千字节,或者使用两个等价物的幂:Gi、Mi、Ki,分别对应吉比特、兆字节或千字节。

谢谢steren和@wietse venema