{"record":{"id":"74a29060026a2066","repo":"alibaba/DataX","slug":"failed-to-queue-new-element-to-server","errorCode":null,"errorMessage":"failed to queue new element to server","messagePattern":"failed to queue new element to server","errorType":"exception","errorClass":"RuntimeException","httpStatus":null,"severity":"critical","filePath":"gdbwriter/src/main/java/com/alibaba/datax/plugin/writer/gdbwriter/model/ScriptGdbGraph.java","lineNumber":218,"sourceCode":"                    retry--;\n                    try {\n                        Thread.sleep(idleTime);\n                    } catch (final InterruptedException e1) {\n                        // ...\n                    }\n                    idleTime = Math.min(idleTime * 2, 2000);\n                    continue;\n                } else if (firstAdd && cause.contains(\"GraphDB id exists\")) {\n                    throw new GdbDuplicateIdException(e);\n                }\n                log.error(\"Add Failed id {}, dsl {}, params {}, e {}\", element.getId(), elementDsl.getFirst(),\n                    elementDsl.getSecond(), e);\n                throw new RuntimeException(e);\n            }\n        }\n        log.error(\"Add Failed id {}, dsl {}, params {}\", element.getId(), elementDsl.getFirst(),\n            elementDsl.getSecond());\n        throw new RuntimeException(\"failed to queue new element to server\");\n    }\n}\n","sourceCodeStart":200,"sourceCodeEnd":221,"githubUrl":"https://github.com/alibaba/DataX/blob/80ec23d5c5328eb90ca364d2749e92dfaf44541e/gdbwriter/src/main/java/com/alibaba/datax/plugin/writer/gdbwriter/model/ScriptGdbGraph.java#L200-L221","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","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."],"exampleFix":null,"handlingStrategy":"retry","validationCode":"// before each batch, cheap connectivity probe\nif (!gdbClient.ping()) {\n    throw new IllegalStateException(\"GDB unreachable; abort before queueing elements\");\n}","typeGuard":null,"tryCatchPattern":"try {\n    writer.write(element);\n} catch (RuntimeException e) {\n    if (e.getCause() != null && e.getCause().getMessage().contains(\"timeout\")) { /* re-run job segment */ }\n    else throw e;\n}","preventionTips":["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."],"tags":["gdb","graph-database","datax","network","retry-exhausted"],"backgroundTag":null,"analyzedSha":"80ec23d5c5328eb90ca364d2749e92dfaf44541e","analyzedAt":"2026-08-14T15:33:51.187Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}