Theodore Brinkofski
Theodore Brinkofski

Reputation: 11

Error when deploying to Google App Engine

I've been deploying different versions of my app to google cloud over the last few days. After successfully uploading a few large files, all of a sudden I receive this error:

ERROR: (gcloud.app.deploy) Cannot upload file [/Users/tgb29/Desktop/shaforms2/python-docs-samples/appengine/flexible/storage/shaforms.bin], which has size [803047362] (greater than maximum allowed size of [33554432]). Please delete the file or add to the skip_files entry in your application .yaml file and try again.

I'm not sure what changed in one deployment.

Upvotes: 1

Views: 3137

Answers (3)

Ajinkya Mahagaonkar
Ajinkya Mahagaonkar

Reputation: 117

I was facing the same issue.

Updating my Gcloud CLI version to 406.0.0 Solved the error.

I was earlier having version 155.0.0 when I had faced this issue.

Some additional notes - Using 155.0.0 with Flex App Engine did not give the error. The error had come only with standard App Engine and was fixed by updating the GCloud version to 406.0.0

Upvotes: 0

user3816621
user3816621

Reputation: 144

I think this problem is releted to Google App Engine Standard java 8. When I used java11, problem disappeared.

This app.yaml works for me:

runtime: java11
env: standard
manual_scaling:
  instances: 1
resources:
  cpu: 1
  memory_gb: 0.5
  disk_size_gb: 10

launch by:

gcloud app deploy

Upvotes: 2

Joan Grau Noël
Joan Grau Noël

Reputation: 3192

App Engine has a limit regarding the number of files and the size they can have when deploying a new version, quoting the documentation:

An application is limited to 10,000 uploaded files per version. Each file is limited to a maximum size of 32 megabytes. Additionally, if the total size of all files for all versions exceeds the initial free 1 gigabyte, then there will be a $ 0.026 per GB per month charge.

Since your file shaforms.bin seems to be above this limit, you cannot deploy the version as long as it contains this file.

The solution would be to deploy your application without this file, for example, in the Python Standard runtime you can add the skip_files flag to ignore certain files, in your case you could do it by adding the following lines to the app.yaml configuration file:

skip_files:
- /Users/tgb29/Desktop/shaforms2/python-docs-samples/appengine/flexible/storage/shaforms.bin

As well, if you need this file to be served from your application, the best would be to upload it to Google Cloud Storage and serve it from there, by using the Client Libraries.

Upvotes: 0

Related Questions