# Gemini 3.7 Flash on Agent Platform: clustered 504s at low request volume despite pacing and Priority retries

**URL:** <https://discuss.google.dev/t/gemini-3-7-flash-on-agent-platform-clustered-504s-at-low-request-volume-despite-pacing-and-priority-retries/397008>\
**Category:** Generative AI & Foundational Models\
**Tags:** gemini\
**Created:** [September 14, 2026, 9:27am UTC](https://discuss.google.dev/t/gemini-3-7-flash-on-agent-platform-clustered-504s-at-low-request-volume-despite-pacing-and-priority-retries/397008 "2026-09-14T09:27:27Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![mglraimundo](https://d3byx8b92xw3lq.cloudfront.net/user_avatar/discuss.google.dev/mglraimundo/32/279572_2.png) [@mglraimundo](https://discuss.google.dev/u/mglraimundo)\
**Post date:** [September 14, 2026, 9:27am UTC](https://discuss.google.dev/t/gemini-3-7-flash-on-agent-platform-clustered-504s-at-low-request-volume-despite-pacing-and-priority-retries/397008/1 "2026-09-14T09:27:27Z")

</div>

Hi everyone,

We use **Gemini 3.7 Flash on Gemini Enterprise Agent Platform** to extract structured JSON from PDF/image reports. We use the global endpoint, Python’s Google Gen AI SDK, low thinking, and high media resolution.

Most requests are fast: **successful requests average 6.7 seconds** , with a median of 4.7 seconds. However, some encounter repeated `504 DEADLINE_EXCEEDED` errors and ultimately fail.

Our traffic is modest, around **500-1000 extraction requests per day** Successful requests typically use approximately **6,500 input tokens and 300 output tokens**.

We have implemented:

- A shared pacer spacing provider attempts by at least **500 ms** per project/location/model group.
- Bounded retries with exponential backoff and jitter, including one retry for deadline errors.
- **Priority requested on retries** after an initial Standard attempt.
- A **30-second per-attempt timeout** and a **65-second overall workflow deadline** , enforced locally as well as through SDK timeout settings.
- Disabled SDK retries to avoid overlapping retry loops.

We are seeing dozens of deadline errors, more that half recovered after retrying, but **a lot still fail with 504s**.

These failures tend to cluster with specific timestamps but, as mentioned above, we are pacing and also occur randomly. The overall timeout guard is working; the problem is that both attempts can consume nearly their entire allowance and still fail, while most requests finish within a few seconds.

Is this expected tail latency for this workload? What diagnostics would distinguish capacity/queueing delays from input-specific processing issues? Would requesting Priority from the first attempt, or changing our retry strategy, improve reliability without extending the latency budget substantially?
