Google App Engine部署错误[12]无法分配内存 [英] Google App Engine Deploy Error[12] Cannot allocate memory

查看:74
本文介绍了Google App Engine部署错误[12]无法分配内存的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的应用程序以-Google App Engine标准环境:Python 37

My Application is running as - Google App Engine Standard Environment : Python 37

我按照以下命令使用gcloud部署我的应用程序

I deploy my application using gcloud as following command

gcloud应用程序部署--project [项目名称] --version uno

gcloud app deploy --project [project-name] --version uno

我的构建因以下错误而失败

my build fail as the following error

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'

更多信息

  • 我的任务队列已经为空.
  • 我尝试将实例类的大小从F1增加到F2和F3,但仍然失败.

推荐答案

如果文件数或正在上传的内容的大小太大并且出现错误,通常会出现错误无法分配内存用于部署代码的实例的内存不足.

The error cannot allocate memory usually appears if the number of files or the size of the content that is being uploaded is too big and the instance used to deploy your code runs out of memory.

此错误的原因可能是因为您使用了过多的依赖项或静态文件.

The cause of this error might be the fact that you are using too many dependencies or static files.

您要下载静态文件吗?我在错误之前看到此命令 tar_runtime_package tar .

Are you downloading static files ? I see this command tar_runtime_package tar before the error.

我建议确保仅使用必要的依赖项,或选择在Google Cloud Run上部署应用程序.

I would suggest to make sure you only use the necessary dependencies or choose to deploy your application on Google Cloud Run.

这篇关于Google App Engine部署错误[12]无法分配内存的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆