App Engine "DEADLINE_EXCEEDED" during gcloud app deploy in CI
The App Engine deploy operation exceeded its deadline. The Cloud Build that packages the version, or the version promotion, took longer than the operation allowed, so gcloud reports DEADLINE_EXCEEDED even though work may still be running server side.
What this error means
gcloud app deploy fails with "DEADLINE_EXCEEDED" or "Operation ... timed out" after the build/upload phase, often on large apps or slow dependency installs.
ERROR: (gcloud.app.deploy) Error Response: [4] DEADLINE_EXCEEDED:
Deadline expired before operation could complete.Common causes
The build phase is slow
Installing many or heavy dependencies during the App Engine build pushes the operation past its deadline.
Transient slowness in build or promotion
A slow Cloud Build worker or a momentary backend delay can make a normally-quick deploy exceed the deadline.
How to fix it
Shrink and speed up the build
- Trim the deployment with a .gcloudignore so fewer files upload.
- Pin and cache dependencies so the build installs faster.
- Re-run the deploy; a faster build stays within the deadline.
# .gcloudignore
.git/
node_modules/
tests/
*.logRetry the deploy on a transient timeout
If the build was simply slow, re-running often succeeds because the server-side operation may have already advanced.
gcloud app deploy app.yaml --quietHow to prevent it
- Keep the uploaded source small with a .gcloudignore.
- Cache and pin dependencies so builds are fast and deterministic.
- Avoid deploying during known slow windows for large apps.