Google App Engine 部署错误[12] 无法分配内存
Google App Engine Deploy Error[12] Cannot allocate memory
我的申请是 运行 作为
- Google App Engine 标准环境:Python 37
我按照以下命令使用 gcloud 部署我的应用程序
gcloud app deploy --project [project-name] --version uno
我的构建因以下错误而失败
Step #1 - "builder": INFO gzip_tar_runtime_package took 18 seconds
Step #1 - "builder": INFO Finished gzipping tarfile.
Step #1 - "builder": INFO Building app layer took 47 seconds
Step #1 - "builder": INFO starting: Building app layer
Step #1 - "builder": INFO starting: tar_runtime_package
Step #1 - "builder": INFO tar_runtime_package tar -pcf /tmp/tmpyhSCMU.tar --hard-dereference --transform flags=r;s,^,/.googleconfig/, --exclude *.pyc .
Step #1 - "builder": INFO tar_runtime_package took 0 seconds
Step #1 - "builder": INFO Building app layer took 0 seconds
Step #1 - "builder": INFO build process for FTL image took 50 seconds
Step #1 - "builder": INFO full build took 50 seconds
Step #1 - "builder": ERROR tar_runtime_package tar -pcf /tmp/tmpyhSCMU.tar --hard-dereference --transform flags=r;s,^,/.googleconfig/, --exclude *.pyc .
Step #1 - "builder": exited with error [Errno 12] Cannot allocate memory
Step #1 - "builder": tar_runtime_package is likely not on the path
Step #1 - "builder": Traceback (most recent call last):
Step #1 - "builder": File "/usr/lib/python2.7/runpy.py", line 174, in _run_module_as_main
Step #1 - "builder": "__main__", fname, loader, pkg_name)
Step #1 - "builder": File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
Step #1 - "builder": exec code in run_globals
Step #1 - "builder": File "/usr/local/bin/ftl.par/__main__.py", line 65, in <module>
Step #1 - "builder": File "/usr/local/bin/ftl.par/__main__.py", line 60, in main
Step #1 - "builder": File "/usr/local/bin/ftl.par/__main__/ftl/common/ftl_error.py", line 77, in InternalErrorHandler
Step #1 - "builder": IOError: [Errno 2] No such file or directory: '""/output'
更多信息
- 我的任务队列已经空了。
- 我尝试将我的实例 class 从 F1 增大到 F2 和 F3,但它仍然失败。
如果正在上传的文件数量或内容太大,并且用于部署代码的实例内存不足,通常会出现错误 cannot allocate memory
。
导致此错误的原因可能是您使用了过多的依赖项或静态文件。
您正在下载静态文件吗?我在错误之前看到这个命令 tar_runtime_package tar
。
我建议确保您只使用必要的依赖项或选择在 Google 云 运行.
上部署您的应用程序
您可以尝试增加内存分配吗?
resources:
disk_size_gb: 10
我的申请是 运行 作为 - Google App Engine 标准环境:Python 37
我按照以下命令使用 gcloud 部署我的应用程序
gcloud app deploy --project [project-name] --version uno
我的构建因以下错误而失败
Step #1 - "builder": INFO gzip_tar_runtime_package took 18 seconds
Step #1 - "builder": INFO Finished gzipping tarfile.
Step #1 - "builder": INFO Building app layer took 47 seconds
Step #1 - "builder": INFO starting: Building app layer
Step #1 - "builder": INFO starting: tar_runtime_package
Step #1 - "builder": INFO tar_runtime_package tar -pcf /tmp/tmpyhSCMU.tar --hard-dereference --transform flags=r;s,^,/.googleconfig/, --exclude *.pyc .
Step #1 - "builder": INFO tar_runtime_package took 0 seconds
Step #1 - "builder": INFO Building app layer took 0 seconds
Step #1 - "builder": INFO build process for FTL image took 50 seconds
Step #1 - "builder": INFO full build took 50 seconds
Step #1 - "builder": ERROR tar_runtime_package tar -pcf /tmp/tmpyhSCMU.tar --hard-dereference --transform flags=r;s,^,/.googleconfig/, --exclude *.pyc .
Step #1 - "builder": exited with error [Errno 12] Cannot allocate memory
Step #1 - "builder": tar_runtime_package is likely not on the path
Step #1 - "builder": Traceback (most recent call last):
Step #1 - "builder": File "/usr/lib/python2.7/runpy.py", line 174, in _run_module_as_main
Step #1 - "builder": "__main__", fname, loader, pkg_name)
Step #1 - "builder": File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
Step #1 - "builder": exec code in run_globals
Step #1 - "builder": File "/usr/local/bin/ftl.par/__main__.py", line 65, in <module>
Step #1 - "builder": File "/usr/local/bin/ftl.par/__main__.py", line 60, in main
Step #1 - "builder": File "/usr/local/bin/ftl.par/__main__/ftl/common/ftl_error.py", line 77, in InternalErrorHandler
Step #1 - "builder": IOError: [Errno 2] No such file or directory: '""/output'
更多信息
- 我的任务队列已经空了。
- 我尝试将我的实例 class 从 F1 增大到 F2 和 F3,但它仍然失败。
如果正在上传的文件数量或内容太大,并且用于部署代码的实例内存不足,通常会出现错误 cannot allocate memory
。
导致此错误的原因可能是您使用了过多的依赖项或静态文件。
您正在下载静态文件吗?我在错误之前看到这个命令 tar_runtime_package tar
。
我建议确保您只使用必要的依赖项或选择在 Google 云 运行.
上部署您的应用程序您可以尝试增加内存分配吗?
resources:
disk_size_gb: 10