Skip to content
Latchkey

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.

gcloud
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

  1. Trim the deployment with a .gcloudignore so fewer files upload.
  2. Pin and cache dependencies so the build installs faster.
  3. Re-run the deploy; a faster build stays within the deadline.
.gcloudignore
# .gcloudignore
.git/
node_modules/
tests/
*.log

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

Terminal
gcloud app deploy app.yaml --quiet

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

Frequently asked questions

What causes ""DEADLINE_EXCEEDED""?
Installing many or heavy dependencies during the App Engine build pushes the operation past its deadline.
How do I fix "DEADLINE_EXCEEDED"?
Shrink and speed up the build

Related guides

References

Latchkey auto-heals failures like this one - detected, fixed, and retried without you. Start free → 30-day trial · No credit card