Every time I try to deploy I get - (gcloud.preview.app.deploy) Error Response: [4] DEADLINE_EXCEEDED
There's a 10 minute default timeout for Docker builds (the mechanism by which runtime: custom
App Engine builds work). You can increase this by running gcloud config set app/cloud_build_timeout [NUMBER OF SECONDS]
.
You could also work around by performing the build yourself:
docker build . -t gcr.io/myapp/myimage
gcloud docker push gcr.io/myapp/myimage
gcloud preview app deploy app.yaml --image-url=gcr.io/myapp/myimage
However, in general, your Docker builds shouldn't be taking this long. It's usually better to have a base image with all of your dependencies already built in, and just have the final build derive from that image and install your app. This way, your builds will be much quicker.
This error is raised when the overall request times out.
The execution limit is 10 minutes for task queue requests.
You can increase this timeout limit on google cloud shell, by typing gcloud config set app/cloud_build_timeout [TIMEOUT_SECONDS]
Example
gcloud config set app/cloud_build_timeout 1000