pinpoint-apm/pinpoint · error · ClusterException

Request limit exceeded. limit:

Error message

Request limit exceeded. limit:

What it means

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.

Solutions

  1. Check connectivity and health of the target agents/collectors that are timing out
  2. Increase the maxCount/limit configuration to match the number of targets
  3. Reduce the number of agents targeted per request (narrow the query)
  4. Retry the request once the flaky agents respond; investigate TimeoutException entries in logs

Example fix

// before (config)
maxCount=3  // too small for 10 agents
// after
maxCount=32
Defensive patterns

Strategy: try-catch

Validate before calling

// check target responsiveness before issuing the command
if (targetAgents.size() > configuredMaxCount) {
    throw new IllegalArgumentException("targets exceed maxCount limit");
}

Try / catch

try { controller.request(...); } catch (ClusterException e) {
    if (e.getMessage().startsWith("Request limit exceeded")) {
        // inspect agent health / increase maxCount, then retry
    }
}

Prevention

When it happens

Trigger: 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.

Common situations: 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.

Understand the failure class

Background: Request timed out: what client-side request timeouts mean across libraries (Request timed out, TIMED_OUT, APITimeoutError) — this error's family across 39 libraries.

Related errors


AI-assisted analysis of pinpoint-apm/pinpoint@744c3d3075 (2026-09-07). Data as JSON: /api/errors/42147adc15130e33. Report an issue: GitHub.

Appendix: source

Thrown at realtime/realtime-collector/src/main/java/com/navercorp/pinpoint/realtime/collector/controller/ClusterPointController.java:245

        });

        for (int i = 0; i < maxCount; i++) {
            CompletableFuture<PCmdEchoResponse> responseFuture = mono.toFuture();
            try {
                responseFuture.get(3000, TimeUnit.MILLISECONDS);
                return responseFuture;
            } catch (InterruptedException e) {
                Thread.currentThread().interrupt();
                throw new ClusterException(e);
            } catch (ExecutionException e) {
                throw new ClusterException(e.getCause());
            } catch (TimeoutException e) {
                throw new ClusterException(e);
            } catch (Exception ignored) {
            }
        }

        throw new ClusterException("Request limit exceeded. limit:" +  maxCount);
    }

    private <T> String buildHtml(List<T> stats) {
        StringBuilder buffer = new StringBuilder();
        for (T stat : stats) {
            String html = new HTMLBuilder().build(stat);
            buffer.append(html);
            buffer.append("<br>");
        }
        return buffer.toString();
    }

    private static class GrpcAgentConnectionStats {

        private final InetSocketAddress remoteAddress;

        private final ClusterKey clusterKey;

View on GitHub (pinned to 744c3d3075)