gcloud app deploy :这个部署有太多的文件 [英] gcloud app deploy : This deployment has too many files

查看:19
本文介绍了gcloud app deploy :这个部署有太多的文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我尝试通过 gcloud 部署我的 GAE 应用程序时,出现以下错误.

I got the below error, when I tried to deploy my GAE app through gcloud.

Updating service [default]...failed.                                                                  
ERROR: (gcloud.app.deploy) Error Response: [400] This deployment has too many files. New versions are limited to 10000 files for this app.

Details: [
  [
    {
      "@type": "type.googleapis.com/google.rpc.BadRequest",
      "fieldViolations": [
        {
          "description": "This deployment has too many files. New versions are limited to 10000 files for this app.",
          "field": "version.deployment.files[...]"
        }
      ]
    }
  ]
]

有没有办法解决这个问题?

Is there any way to tackle this problem?

推荐答案

如果您尝试部署的服务中确实有超过 10000 个文件的配额,那么您可能必须减少相应编号.

If you really have more than the 10000 files quota in the service you're trying to deploy then you might have to reduce the number accordingly.

其他可以尝试的事情:

  • you might be able to get a quota increase, see Getting error on GAE: Max number of files and blobs is 10000
  • delete whatever files are not actually needed, or just skip them during deployment see skip_files or, for the more recent cloud SDK versions, the .gcloudignore file.
  • if you have a lot of static files consider moving (some of) them to GCS instead, see Approaches for overcoming 10000 file limit on Google App Engine?
  • split the service into multiple smaller services - each with its own 10000 files limit.

假设您实际上没有达到文件配额,那么错误通常表明您的应用程序目录中有循环/循环引用符号链接.这也可以解释你在这篇文章的评论中提到的路径:https://stackoverflow.com/a/42425048/4495081.您只需要修复有问题的符号链接.同样,简单/一致的目录结构可以帮助防止此类问题.

Assuming you do not actually hit the files quota then the error usually indicates you have looping/circular referencing symlinks in your app directory. Which could also explain a path like the one you mentioned in a comment to this post: https://stackoverflow.com/a/42425048/4495081. You just have to fix the offending symlink(s). Again, a simple/consistent directory structure could help prevent such issues.

这篇关于gcloud app deploy :这个部署有太多的文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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