{"record":{"id":"8e5229544f391cc9","repo":"alibaba/nacos","slug":"503-8e5229","errorCode":"-503","errorMessage":"More than client-side current limit threshold","messagePattern":"More than client-side current limit threshold","errorType":"exception","errorClass":"NacosException","httpStatus":null,"severity":"warning","filePath":"client/src/main/java/com/alibaba/nacos/client/config/impl/ClientWorker.java","lineNumber":1387,"sourceCode":"        \n        Response requestProxy(RpcClient rpcClientInner, Request request) throws NacosException {\n            return requestProxy(rpcClientInner, request, requestTimeout);\n        }\n        \n        private Response requestProxy(RpcClient rpcClientInner, Request request, long timeoutMills)\n            throws NacosException {\n            try {\n                request.putAllHeader(super.getSecurityHeaders(resourceBuild(request)));\n                request.putAllHeader(super.getCommonHeader());\n            } catch (Exception e) {\n                throw new NacosException(NacosException.CLIENT_INVALID_PARAM, e);\n            }\n            JsonObject asJsonObjectTemp = new Gson().toJsonTree(request).getAsJsonObject();\n            asJsonObjectTemp.remove(\"headers\");\n            asJsonObjectTemp.remove(\"requestId\");\n            boolean limit = Limiter.isLimit(request.getClass() + asJsonObjectTemp.toString());\n            if (limit) {\n                throw new NacosException(NacosException.CLIENT_OVER_THRESHOLD,\n                    \"More than client-side current limit threshold\");\n            }\n            Response response;\n            if (timeoutMills < 0) {\n                response = rpcClientInner.request(request);\n            } else {\n                response = rpcClientInner.request(request, timeoutMills);\n            }\n            // If the 403 login operation is triggered, refresh the accessToken of the client\n            if (response.getErrorCode() == ConfigQueryResponse.NO_RIGHT) {\n                reLogin();\n            }\n            return response;\n        }\n        \n        private RequestResource resourceBuild(Request request) {\n            if (request instanceof ConfigQueryRequest) {\n                String tenant = ((ConfigQueryRequest) request).getTenant();","sourceCodeStart":1369,"sourceCodeEnd":1405,"githubUrl":"https://github.com/alibaba/nacos/blob/9b989acdf181d00898f2e8839257bb2b2a3cefe3/client/src/main/java/com/alibaba/nacos/client/config/impl/ClientWorker.java#L1369-L1405","documentation":"Thrown with code -503 (CLIENT_OVER_THRESHOLD) by ClientWorker.requestProxy when the client-side rate limiter (Limiter) rejects the request. Limiter uses a per-key Guava RateLimiter defaulting to 5 QPS (overridable via the 'limitTime' property) keyed on the request class + JSON body. When tryAcquire fails within 1000ms, the request is rejected to protect the client/server from config-query storms.","triggerScenarios":"Issuing getConfig/publishConfig calls faster than the client-side QPS cap (default 5/sec) for the same request signature, e.g. a tight loop calling getConfig in many threads.","commonSituations":"Application startup fan-out where many beans call getConfig concurrently, a retry storm, or a custom loop polling config without throttling.","solutions":["Reduce the getConfig/publishConfig call rate to stay under 5 QPS (batch or cache results).","Raise the limit via the 'limitTime' system property (e.g. -DlimitTime=20) if higher throughput is intended.","Cache config locally and use listeners for change notification instead of repeated queries.","Investigate and remove runaway loops that issue redundant config requests."],"exampleFix":"// before\nfor (int i = 0; i < 1000; i++) {\n    configService.getConfig(dataId, group, 5000);\n}\n\n// after\nString cached = configService.getConfig(dataId, group, 5000);\nconfigService.addListener(dataId, group, listener);  // react to changes","handlingStrategy":"validation","validationCode":"// throttle getConfig calls to < 5/sec per request signature\nRateLimiter rl = RateLimiter.create(4.0);\nrl.acquire();\nconfigService.getConfig(dataId, group, timeout);","typeGuard":null,"tryCatchPattern":"try {\n    configService.getConfig(dataId, group, timeout);\n} catch (NacosException e) {\n    if (e.getErrCode() == NacosException.CLIENT_OVER_THRESHOLD) {\n        // back off and retry with delay\n        Thread.sleep(500);\n    }\n}","preventionTips":["Cache configs and use listeners instead of repeated getConfig.","Raise -DlimitTime if you legitimately need higher QPS.","Avoid tight startup loops issuing many concurrent getConfig calls."],"tags":["config","rate-limit","client","qps","throttle"],"backgroundTag":null,"analyzedSha":"9b989acdf181d00898f2e8839257bb2b2a3cefe3","analyzedAt":"2026-08-14T07:17:31.569Z","schemaVersion":2},"datasetVersion":"2026-08-14T10:17:34.591Z"}