{"record":{"id":"42147adc15130e33","repo":"pinpoint-apm/pinpoint","slug":"request-limit-exceeded-limit","errorCode":null,"errorMessage":"Request limit exceeded. limit:","messagePattern":"Request limit exceeded\\. limit:","errorType":"exception","errorClass":"ClusterException","httpStatus":null,"severity":"error","filePath":"realtime/realtime-collector/src/main/java/com/navercorp/pinpoint/realtime/collector/controller/ClusterPointController.java","lineNumber":245,"sourceCode":"        });\n\n        for (int i = 0; i < maxCount; i++) {\n            CompletableFuture<PCmdEchoResponse> responseFuture = mono.toFuture();\n            try {\n                responseFuture.get(3000, TimeUnit.MILLISECONDS);\n                return responseFuture;\n            } catch (InterruptedException e) {\n                Thread.currentThread().interrupt();\n                throw new ClusterException(e);\n            } catch (ExecutionException e) {\n                throw new ClusterException(e.getCause());\n            } catch (TimeoutException e) {\n                throw new ClusterException(e);\n            } catch (Exception ignored) {\n            }\n        }\n\n        throw new ClusterException(\"Request limit exceeded. limit:\" +  maxCount);\n    }\n\n    private <T> String buildHtml(List<T> stats) {\n        StringBuilder buffer = new StringBuilder();\n        for (T stat : stats) {\n            String html = new HTMLBuilder().build(stat);\n            buffer.append(html);\n            buffer.append(\"<br>\");\n        }\n        return buffer.toString();\n    }\n\n    private static class GrpcAgentConnectionStats {\n\n        private final InetSocketAddress remoteAddress;\n\n        private final ClusterKey clusterKey;\n","sourceCodeStart":227,"sourceCodeEnd":263,"githubUrl":"https://github.com/pinpoint-apm/pinpoint/blob/744c3d3075e595656abb1ae331ad2c0e4c9eb996/realtime/realtime-collector/src/main/java/com/navercorp/pinpoint/realtime/collector/controller/ClusterPointController.java#L227-L263","documentation":"ClusterPointController.request0 dispatches commands to at most maxCount cluster points/agents; if a request still has pending targets after the retry/timeout loop (including TimeoutException wrapped into ClusterException), it gives up and throws ClusterException(\"Request limit exceeded. limit:\" + maxCount), meaning the request could not be completed within the allowed attempts.","triggerScenarios":"Calling the controller's request endpoint (handler/request) when the number of pending response attempts exceeds maxCount — i.e. repeated timeouts or failed responses from target agents keep the loop iterating past the configured limit.","commonSituations":"Target Pinpoint agents/collectors unresponsive or network-partitioned so responses time out; too many agents targeted for one command; maxCount configured too low for the cluster size.","solutions":["Check connectivity and health of the target agents/collectors that are timing out","Increase the maxCount/limit configuration to match the number of targets","Reduce the number of agents targeted per request (narrow the query)","Retry the request once the flaky agents respond; investigate TimeoutException entries in logs"],"exampleFix":"// before (config)\nmaxCount=3  // too small for 10 agents\n// after\nmaxCount=32","handlingStrategy":"try-catch","validationCode":"// check target responsiveness before issuing the command\nif (targetAgents.size() > configuredMaxCount) {\n    throw new IllegalArgumentException(\"targets exceed maxCount limit\");\n}","typeGuard":null,"tryCatchPattern":"try { controller.request(...); } catch (ClusterException e) {\n    if (e.getMessage().startsWith(\"Request limit exceeded\")) {\n        // inspect agent health / increase maxCount, then retry\n    }\n}","preventionTips":["Monitor agent response times; fix chronically timing-out agents","Size maxCount to at least the number of concurrently targeted agents","Reduce fan-out per request"],"tags":["realtime","timeout","cluster"],"backgroundTag":"request-timeout","analyzedSha":"744c3d3075e595656abb1ae331ad2c0e4c9eb996","analyzedAt":"2026-09-07T18:48:45.289Z","contentChangedAt":"2026-09-07T18:48:45.289Z","schemaVersion":2},"datasetVersion":"2026-09-17T15:17:12.973Z"}