apache/seatunnel · warning
GET /overview dispatch delayed: dispatchDelayMs=
Error message
GET /overview dispatch delayed: dispatchDelayMs={} thread={} What it means
A self-monitoring warning in OverviewServlet.doGet: the request spent more than 500ms waiting before dispatch (e.g. queued in the servlet thread pool or blocked upstream). It exposes the delay via the X-Dispatch-Delay-Ms header and logs the serving thread name.
Solutions
- Reduce polling frequency of the /overview endpoint in your monitoring setup
- Increase the REST service thread pool size in the cluster configuration
- Check GC logs and heap pressure on the node — the companion heap diagnostics (costMs > 500) show memory stats
- Profile what else is running on the node; offload heavy work from the master node serving the REST API
Defensive patterns
Strategy: retry
Validate before calling
// track the dispatch-delay header before continuing polling
const delayMs = Number(resp.headers.get('X-Dispatch-Delay-Ms') || 0);
if (delayMs > 500) backoff(); Try / catch
try {
const resp = await fetch(baseUrl + '/overview');
if (Number(resp.headers.get('X-Dispatch-Delay-Ms')) > 500) {
await sleep(pollInterval * 2); // back off before next poll
}
} catch (e) { /* retry with backoff */ } Prevention
- Poll /overview at moderate intervals (>= 5s)
- Increase REST thread pool if many clients poll concurrently
- Monitor node GC and CPU load
- Alert on X-Dispatch-Delay-Ms header values rather than raw failures
When it happens
Trigger: GET /overview when the Jetty/REST thread pool is saturated or the handler thread is starved; system under heavy load, GC pauses, or many concurrent REST calls delaying dispatch.
Common situations: Large clusters where the overview handler competes with heavy engine work; monitoring systems polling /overview at high frequency; worker overload causing slow request acceptance.
Understand the failure class
Background: Request timed out: what client-side request timeouts mean across libraries (Request timed out, TIMED_OUT, APITimeoutError) — this error's family across 39 libraries.
Related errors
- GET /running-jobs dispatch delayed: dispatchDelayMs=
- GET /overview slow: costMs=
- GET /running-jobs slow: full=
- running-jobs summary slow diagnostics: totalMs=
- running-jobs summary slow: total=
AI-assisted analysis of apache/seatunnel@cf67b549a7 (2026-09-10).
Data as JSON: /api/errors/9c885e0052fab9e0.
Report an issue: GitHub.
Appendix: source
Thrown at seatunnel-engine/seatunnel-engine-server/src/main/java/org/apache/seatunnel/engine/server/rest/servlet/OverviewServlet.java:79
}
long startNs = System.nanoTime();
Map<String, String> tags = getParameterMap(req);
JsonObject body =
JsonUtil.toJsonObject(
JsonUtils.toMap(
JsonUtils.toJsonString(overviewService.getOverviewInfo(tags))));
long costMs = TimeUnit.NANOSECONDS.toMillis(System.nanoTime() - startNs);
long dispatchDelayMs = receivedMs <= 0 ? -1 : Math.max(0, nowMs - receivedMs);
resp.setHeader("X-Dispatch-Delay-Ms", String.valueOf(dispatchDelayMs));
resp.setHeader("X-Handler-Cost-Ms", String.valueOf(costMs));
writeJson(resp, body);
if (dispatchDelayMs > 500) {
log.warn(
"GET /overview dispatch delayed: dispatchDelayMs={} thread={}",
dispatchDelayMs,
Thread.currentThread().getName());
}
if (costMs > 500) {
Runtime rt = Runtime.getRuntime();
long usedBytes = rt.totalMemory() - rt.freeMemory();
log.warn(
"GET /overview slow: costMs={} thread={} heapUsedMB={} heapTotalMB={} "
+ "heapMaxMB={}",
costMs,
Thread.currentThread().getName(),
usedBytes / 1024 / 1024,
rt.totalMemory() / 1024 / 1024,
rt.maxMemory() / 1024 / 1024);
}
}
}View on GitHub (pinned to cf67b549a7)