0

After adding a new library in my local environment and deploying to GCP I got the following error.

$ gcloud app deploy
ERROR: (gcloud.app.deploy) INVALID_ARGUMENT: This deployment has too many files. New versions are limited to 10000 files for this app.
- '@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[...]

I think this error can be avoided by sending a cap increase request, but I've never done that so I don't know what to do. How can I raise the limit?

imori
  • 17
  • 5

1 Answers1

1

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.

There is a know limit in this quota.Also, according to official documentation

Is your app exceeding the default limits? If you have Silver, Gold, or Platinum support package, you can contact your support representative to request higher throughput limits

Moreover, here are somethings you can try:

  1. You might be able to get a quota increase, see Getting error on GAE: Max number of files and blobs is 10000

  2. 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 .

  3. If you have a lot of static files consider moving (some of) them to GCS instead: You could have your app store the images in Google Cloud Storage GCS, as app data, not as app static files, so they wouldn't count towards the app's 10k files limit.

  4. Split the service into multiple smaller services - each with its own 10000 files limit.

  • I also considered using ".gcloudignore", but I can't reduce the number of files because I need a newly added file. I don't know the specific of 3 and 4, so can I ask for the specific procedure? – imori Sep 22 '20 at 07:43
  • Here you can find information about [Structuring Web Services in App Engine](https://cloud.google.com/appengine/docs/standard/nodejs/configuration-files) – marian.vladoi Sep 29 '20 at 12:21