{"record":{"id":"e13462cc3845705b","repo":"alibaba/nacos","slug":"nacos-http-delete-the-maximum-number-of-tolerabl","errorCode":null,"errorMessage":"[NACOS HTTP-DELETE] The maximum number of tolerable server reconnection errors has been reached","messagePattern":"\\[NACOS HTTP-DELETE\\] The maximum number of tolerable server reconnection errors has been reached","errorType":"exception","errorClass":"ConnectException","httpStatus":null,"severity":"critical","filePath":"client/src/main/java/com/alibaba/nacos/client/config/http/ServerHttpAgent.java","lineNumber":233,"sourceCode":"                    ExceptionUtil.getStackTrace(connectException));\n            } catch (SocketTimeoutException stoe) {\n                LOGGER.error(\n                    \"[NACOS SocketTimeoutException httpDelete] currentServerAddr:{}， err : {}\",\n                    serverListMgr.getCurrentServer(), ExceptionUtil.getStackTrace(stoe));\n            } catch (Exception ex) {\n                LOGGER.error(\n                    \"[NACOS Exception httpDelete] currentServerAddr: \"\n                        + serverListMgr.getCurrentServer(),\n                    ex);\n                throw ex;\n            }\n            \n            if (serverListMgr.getIterator().hasNext()) {\n                currentServerAddr = serverListMgr.getIterator().next();\n            } else {\n                maxRetry--;\n                if (maxRetry < 0) {\n                    throw new ConnectException(\n                        \"[NACOS HTTP-DELETE] The maximum number of tolerable server reconnection errors has been reached\");\n                }\n                serverListMgr.refreshCurrentServerAddr();\n            }\n            \n        } while (System.currentTimeMillis() <= endTime);\n        \n        LOGGER.error(\"no available server\");\n        throw new ConnectException(\"no available server\");\n    }\n    \n    private String getUrl(String serverAddr, String relativePath) {\n        String contextPath = serverListMgr.getContextPath();\n        return serverAddr + ContextPathUtil.normalizeContextPath(contextPath) + relativePath;\n    }\n    \n    private boolean isFail(HttpRestResult<String> result) {\n        return result.getCode() == HttpURLConnection.HTTP_INTERNAL_ERROR","sourceCodeStart":215,"sourceCodeEnd":251,"githubUrl":"https://github.com/alibaba/nacos/blob/9b989acdf181d00898f2e8839257bb2b2a3cefe3/client/src/main/java/com/alibaba/nacos/client/config/http/ServerHttpAgent.java#L215-L251","documentation":"Thrown by ServerHttpAgent.httpDelete when the retry budget is exhausted during a DELETE (config removal). Same loop/maxRetry logic as GET/POST. Appears when removing a config and every server fails, decrementing maxRetry below zero before the deadline.","triggerScenarios":"configService.removeConfig / DELETE request where all servers return failure codes or throw connection errors, exhausting maxRetry.","commonSituations":"Removing a config during a cluster outage, all nodes unreachable, or a gateway returning 5xx for DELETE.","solutions":["Confirm server availability and that the DELETE route is permitted (auth, firewall).","Check the preceding per-server log lines for the actual transport error.","Increase retry budget / timeout if transient.","Verify the access token/credentials are valid (403 can cascade into repeated failures)."],"exampleFix":null,"handlingStrategy":"retry","validationCode":"// verify DELETE endpoint is reachable and auth is valid before removing\n// (no public pre-check API; rely on health endpoint + valid token)","typeGuard":null,"tryCatchPattern":"try {\n    configService.removeConfig(dataId, group);\n} catch (Exception e) {\n    if (e.getMessage().contains(\"HTTP-DELETE\")) {\n        log.error(\"delete failed on all servers\", e);\n    }\n}","preventionTips":["Ensure credentials/token are valid to avoid cascading 403s on DELETE.","Confirm the cluster is up before destructive ops.","Log the per-server errors preceding the terminal throw."],"tags":["network","config","http-delete","client","retry-exhausted"],"backgroundTag":null,"analyzedSha":"9b989acdf181d00898f2e8839257bb2b2a3cefe3","analyzedAt":"2026-08-14T07:17:31.569Z","schemaVersion":2},"datasetVersion":"2026-08-14T10:17:34.591Z"}