错误响应:[13] 在 Google Cloud SDK 上部署项目时发生内部错误

Error Response: [13] An internal error occurred, when deploying project on Google Cloud SDK

从昨天开始,我一直在尝试在 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.

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

中的示例

从不同的角度来看,我看到了几个 gcloud preview app deploy 被绊倒的报告,你可以随时尝试其他方法来排除这种情况,请参阅我对这个问答的回答:Google App Engine deploy with Django module after gcloud update?

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

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

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

import reportlab
...

我不知道为什么它不起作用。但是我记得在使用应用程序引擎上传项目时看到了有关文件限制的内容。部署 1 个 zip 文件优于组成 reportlab.

的 181 个文件

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

就我而言,问题是因为我有一个超过 1000 files 的文件夹。一旦我将其中一些文件移到别处,内部错误消息就消失了!

我在一个文件夹中尝试 1000 files,它成功了,然后,我在同一文件夹中添加了一个文件 (1001 files total),但同样的内部错误又回来了。 google 应用引擎 1000 files per folder.

似乎是一种限制