Google Vertex AI (generative AI) error
Vertex AI 504 DEADLINE_EXCEEDED: what it means and how to fix it
504 DEADLINE_EXCEEDEDRetry? YesLast verified 1 documented fix2 sources
What it means
The request did not finish within the deadline. A client deadline shorter than the server's default deadline can cause this.
Causes
- The client set a deadline that is too short, for example 10 seconds
How to fix it
- Fix 1.
Remove the deadline setting to use the server default, or set a longer deadline. For Flex pay-as-you-go, increase the request timeout (for example to 30 minutes) instead of retrying aggressively.
More Vertex AI errors
All 11 Vertex AI errors400 INVALID_ARGUMENT / FAILED_PRECONDITIONRetry? No401 UNAUTHENTICATEDRetry? No403 PERMISSION_DENIEDRetry? No404 NOT_FOUNDRetry? No429 RESOURCE_EXHAUSTEDRetry? Yes429 Resource exhausted, please try again laterRetry? Yes429 Too many requests. Exceeded the Provisioned ThroughputRetry? Not stated499 CANCELLEDRetry? Not stated
HTTP 504 at other providers
FAQ
What does the Vertex AI error "504 DEADLINE_EXCEEDED" mean?
The request did not finish within the deadline. A client deadline shorter than the server's default deadline can cause this.
How do I fix Vertex AI "504 DEADLINE_EXCEEDED"?
Remove the deadline setting to use the server default, or set a longer deadline. For Flex pay-as-you-go, increase the request timeout (for example to 30 minutes) instead of retrying aggressively.
Should I retry Vertex AI "504 DEADLINE_EXCEEDED"?
Yes. The official docs treat this error as retryable.
Which other AI APIs return HTTP 504?
Per their official error docs: Anthropic API (504 timeout_error), Gemini API (504 deadline_exceeded; 504 DEADLINE_EXCEEDED), Mistral API (504 Gateway timeout), OpenRouter (504 timeout).
Sources
Last verified against 2 sources: Vertex AI's official docs and official SDK repositories.
Newsletter
Know when the APIs change
One email per week. New model releases, API changes, what broke, and how developers are working around it.