gcloud app deploy :这个部署有太多的文件 [英] gcloud app deploy : This deployment has too many files
问题描述
当我尝试通过 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.
其他可以尝试的事情:
- 您可能能够增加配额,请参阅在 GAE 上出错:文件和 blob 的最大数量为 10000
- 删除实际不需要的任何文件,或在部署期间跳过它们,请参阅skip_files 或者,对于更新的云 SDK 版本,
.gcloudignore
文件. - 如果您有很多静态文件,请考虑将它们(其中一些)移至 GCS,请参阅 在 Google App Engine 上克服 10000 个文件限制的方法?
- 将服务拆分为多个较小的服务 - 每个服务都有自己的 10000 个文件限制.
- 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屋!