alibaba/DataX · critical · RuntimeException
failed to queue new element to server
Error message
failed to queue new element to server
What it means
Generic RuntimeException thrown by ScriptGdbGraph after the retry loop (10 attempts with exponential backoff capped at 2000ms) fails to enqueue/send an element to the GDB server. The underlying client exception was either retried away or never surfaced, so this message is a symptom of persistent connection or server-side failure, and the last attempt's error is only visible in the preceding 'Add Failed id ...' log line if an exception was caught.
Source
Thrown at gdbwriter/src/main/java/com/alibaba/datax/plugin/writer/gdbwriter/model/ScriptGdbGraph.java:218
retry--;
try {
Thread.sleep(idleTime);
} catch (final InterruptedException e1) {
// ...
}
idleTime = Math.min(idleTime * 2, 2000);
continue;
} else if (firstAdd && cause.contains("GraphDB id exists")) {
throw new GdbDuplicateIdException(e);
}
log.error("Add Failed id {}, dsl {}, params {}, e {}", element.getId(), elementDsl.getFirst(),
elementDsl.getSecond(), e);
throw new RuntimeException(e);
}
}
log.error("Add Failed id {}, dsl {}, params {}", element.getId(), elementDsl.getFirst(),
elementDsl.getSecond());
throw new RuntimeException("failed to queue new element to server");
}
}
View on GitHub (pinned to 80ec23d5c5)
Solutions
- Check the log for the preceding 'Add Failed' / exception detail to identify the root cause (connect timeout, auth, server error).
- Verify GDB endpoint, port, username and password in the job configuration and that the instance is reachable from the DataX host.
- Reduce write pressure (lower channel/thread count, smaller batch) or wait for GDB load/throttling to subside, then re-run the job.
- If failures are transient at scale, re-run the failed job segment; GDB upsert semantics make retrying the same ids safe.
Defensive patterns
Strategy: retry
Validate before calling
// before each batch, cheap connectivity probe
if (!gdbClient.ping()) {
throw new IllegalStateException("GDB unreachable; abort before queueing elements");
} Try / catch
try {
writer.write(element);
} catch (RuntimeException e) {
if (e.getCause() != null && e.getCause().getMessage().contains("timeout")) { /* re-run job segment */ }
else throw e;
} Prevention
- Monitor GDB instance load/CPU and DataX error logs; back off channel count when throttled.
- Make jobs idempotent (stable element ids + upsert) so retrying after exhaustion is safe.
- Capture the 'Add Failed id/dsl/params' log line — it carries the true root cause, the final exception does not.
When it happens
Trigger: GdbClient submit/queue calls failing for all 10 retries — network interruptions to the GDB endpoint, SSL/auth failures, server overload returning errors, or connection pool exhaustion. Distinct path: 'GraphDB id exists' during firstAdd throws GdbDuplicateIdException instead.
Common situations: GDB instance restarted or under heavy load during a DataX job; wrong host/port or credentials in the job config; throttling on the GDB instance causing sustained failures longer than the ~10-retry window.
Related errors
- property value length over limit(${maxPropValueLength})
- request length over limit(${maxRequestLength})
- Response Status Code :
- load_url cannot be empty, or the host cannot connect.Please
- Failed to flush data to Doris, Error could not get the final
AI-assisted analysis of alibaba/DataX@80ec23d5c5 (2026-08-14).
Data as JSON: /api/errors/74a29060026a2066.
Report an issue: GitHub.