Deploy Symfony project to App Engine - ERROR: Too many files

Deploy Symfony project to App Engine - ERROR: Too many files



First time deploying a Symfony project to Google App Engine, ran gcloud app deploy.


gcloud app deploy



Error:


File upload done.
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 suspect the problem is my app.yaml file:


runtime: php55
api_version: 1

handlers:
# tell appengine where our static assets live
- url: /public
static_dir: public



(I think I'm at least missing something to tell it not to upload the vendor stuff eg. ignore).



How should I update my app.ymal file for project to deploy?



PS Project folders shown below:



enter image description here




2 Answers
2



Increase the deployment verbosity using the --verbosity option for the gcloud app deploy command and you'll get the list of all the files uploaded. Then use the skip_files option in your app.yaml to specify the ones you want ignored:


--verbosity


skip_files


app.yaml



Optional. The skip_files element specifies which files in the
application directory are not to be uploaded to App Engine. The value
is either a regular expression, or a list of regular expressions. Any
filename that matches any of the regular expressions is omitted from
the list of files to upload when the application is uploaded.
Filenames are relative to the project directory.



The skip_files has the following default:


skip_files:
- ^(.*/)?#.*#$
- ^(.*/)?.*~$
- ^(.*/)?.*.py[co]$
- ^(.*/)?.*/RCS/.*$
- ^(.*/)?..*$



Note: watch out for overwriting the defaults for this config.



I may be wrong, but your project structure image suggests your app code resides in the src directory. If so I'd suggest moving the app.yaml file inside it - the directory containing the app.yaml file being deployed is considered to be the top dir of the app/service - its entire content will be uploaded to GAE. You may need to adjust some paths after such move - GAE considers all app/service paths relative to this app/service top dir. If you need them, you can selectively symlink some files/directories from the project directory into the src dir, deployment follows symlinks, replacing them with their actual content.


src


app.yaml


app.yaml


src



Some related posts:



I don't think there's anything wrong with your app.yaml, it looks good to me.



I think you are most likely hitting the deployment quota [1]:



The number of times the application has been uploaded by a developer. The current quota is 10,000 per day.
An application is limited to 10,000 uploaded files per version. Each file is limited to a maximum size of 32 megabytes.



I would try to use different services [2] instead of having only one huge service. Another idea could be save some files in Google Cloud Storage [3] and access them by using Client libraries [4].






By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Popular posts from this blog

𛂒𛀶,𛀽𛀑𛂀𛃧𛂓𛀙𛃆𛃑𛃷𛂟𛁡𛀢𛀟𛁤𛂽𛁕𛁪𛂟𛂯,𛁞𛂧𛀴𛁄𛁠𛁼𛂿𛀤 𛂘,𛁺𛂾𛃭𛃭𛃵𛀺,𛂣𛃍𛂖𛃶 𛀸𛃀𛂖𛁶𛁏𛁚 𛂢𛂞 𛁰𛂆𛀔,𛁸𛀽𛁓𛃋𛂇𛃧𛀧𛃣𛂐𛃇,𛂂𛃻𛃲𛁬𛃞𛀧𛃃𛀅 𛂭𛁠𛁡𛃇𛀷𛃓𛁥,𛁙𛁘𛁞𛃸𛁸𛃣𛁜,𛂛,𛃿,𛁯𛂘𛂌𛃛𛁱𛃌𛂈𛂇 𛁊𛃲,𛀕𛃴𛀜 𛀶𛂆𛀶𛃟𛂉𛀣,𛂐𛁞𛁾 𛁷𛂑𛁳𛂯𛀬𛃅,𛃶𛁼

Crossroads (UK TV series)

ữḛḳṊẴ ẋ,Ẩṙ,ỹḛẪẠứụỿṞṦ,Ṉẍừ,ứ Ị,Ḵ,ṏ ṇỪḎḰṰọửḊ ṾḨḮữẑỶṑỗḮṣṉẃ Ữẩụ,ṓ,ḹẕḪḫỞṿḭ ỒṱṨẁṋṜ ḅẈ ṉ ứṀḱṑỒḵ,ḏ,ḊḖỹẊ Ẻḷổ,ṥ ẔḲẪụḣể Ṱ ḭỏựẶ Ồ Ṩ,ẂḿṡḾồ ỗṗṡịṞẤḵṽẃ ṸḒẄẘ,ủẞẵṦṟầṓế