【问题标题】:Error Response: [13] An internal error occurred, when deploying project on Google Cloud SDK错误响应:[13] 在 Google Cloud SDK 上部署项目时发生内部错误
【发布时间】:2016-02-03 06:55:33
【问题描述】:

从昨天开始,我一直在尝试在 Google Cloud SDK 上部署我的项目,并且一遍又一遍地遇到同样的错误。

我的 app.yaml 文件如下所示:

runtime: python27
api_version: 1
threadsafe: yes

- url: /
  static_files: bin/index.html 
  upload: bin/index.html

- url: /assets
  static_dir: bin/assets 

- url: /src
  static_dir: bin/src

- url: /vendor
  static_dir: bin/vendor

- url: /templates-app.js
  static_files: static/templates-app.js 
  upload: static/templates-app.js

- url: /templates-common.js
  static_files: static/templates-common.js 
  upload: static/templates-common.js

- url: .*
  script: main.app

我使用这个命令来部署:

gcloud preview app deploy app.yaml --version 1 --promote --force

我得到这个错误:

Beginning deployment...
Copying files to Google Cloud Storage...
Synchronizing files to [gs://staging.myapp.appspot.com/].
Updating module [default]...failed.
ERROR: (gcloud.preview.app.deploy) Error Response: [13] An internal error occurred.

【问题讨论】:

    标签: google-app-engine google-cloud-platform


    【解决方案1】:

    我今天遇到了同样的错误Error Response: [13] An internal error occurred

    在我的情况下,问题是因为我有一个超过 1000 files 的文件夹。一旦我将其中一些文件移到其他地方,内部错误消息就消失了!

    我在一个文件夹中尝试了1000 files,它成功了,然后我在同一个文件夹中添加了一个文件(1001 files total),同样的内部错误又回来了。谷歌应用引擎1000 files per folder似乎是一种限制。

    【讨论】:

    • 很高兴知道最大文件限制是多少
    【解决方案2】:

    我注意到您在 app.yaml 文件中没有您的应用名称,并且您也没有在上传 cmd 中指定它。我建议养成在app.yaml 中提供尽可能多的信息的习惯,以尽量减少人为错误的可能性。您也可以在app.yaml 中指定版本。当您使用多模块应用程序时,这种习惯将有所帮助,其中此类信息是强制性的。请参阅modules config doc 中的示例。

    从另一个角度来看,我看到了几份报告,其中gcloud preview app deploy 跳闸,您可以随时尝试其他方法来排除此类情况,请参阅我对此问答的回答:Google App Engine deploy with Django module after gcloud update?

    【讨论】:

    • 我发现相反的情况,像gcloud preview app deploy ... 这样的命令往往会抱怨applicationversion 在app.yaml 中。因此,这些天我主要在部署时将它们添加到命令行(--project xxx --version yyy),除非使用 GoogleAppEngineLauncher 运行本地服务器。
    【解决方案3】:

    它最终成为lib 文件夹中的reportlab python 库。

    我发现将其作为 zip 文件而不是普通文件夹插入是可行的。

    import sys
    sys.path.insert(0, 'reportlab.zip')
    
    import reportlab
    ...
    

    我不知道为什么它不起作用。但我记得在使用 app-engine 上传项目时看到了一些关于文件限制的信息。部署 1 个 zip 文件优于组成 reportlab 的 181 个文件。

    【讨论】:

    • 现在遇到同样的错误。错误 13 之外的任何细节似乎都被破坏了。我有很多文件,但没有超出任何限制,除非最近更改了限制。
    • 我收到了几次错误。每次减少文件数对我都有帮助。
    猜你喜欢
    • 1970-01-01
    • 2018-05-07
    • 1970-01-01
    • 2018-05-05
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-03-07
    相关资源
    最近更新 更多