pinpoint-apm/pinpoint · error · RuntimeException

Too many link data. Reduce the values of the Inbound/outboun

Error message

Too many link data. Reduce the values of the Inbound/outbound or do not select the bidirectional option. limiter=${limiter}

What it means

MapServiceImpl.selectApplicationMap guards the server against building oversized application maps: if linkSelector returns more link data points than linkDataLimiter's limit, it throws a RuntimeException (surfaced as HTTP 500) telling the caller to narrow the query. This protects the JVM from OOM when tracing huge, highly-connected topologies.

Source

Thrown at web/src/main/java/com/navercorp/pinpoint/web/applicationmap/service/MapServiceImpl.java:105

        StopWatch watch = new StopWatch("ApplicationMap");
        watch.start("ApplicationMap Link Fetch(Out,In) Time");

        final SearchOption searchOption = option.getSearchOption();
        LinkSelectorType linkSelectorType = searchOption.getLinkSelectorType();
        int outSearchDepth = searchOption.getOutSearchDepth();
        int inSearchDepth = searchOption.getInSearchDepth();

        LinkDataMapProcessor outLinkProcessor = LinkDataMapProcessor.applicationNodeFilter(searchOption.isWasOnly());
        LinkDataMapProcessor inLinkProcessor = LinkDataMapProcessor.NO_OP;
        LinkSelector linkSelector = linkSelectorFactory.createLinkSelector(linkSelectorType, outLinkProcessor, inLinkProcessor);

        TimeWindow timeWindow = option.getTimeWindow();
        LinkDataDuplexMap linkDataDuplexMap = linkSelector.select(option.getSourceApplications(), timeWindow, outSearchDepth, inSearchDepth);
        watch.stop();

        if (linkDataLimiter.excess(linkDataDuplexMap.getTotalCount())) {
            throw new RuntimeException("Too many link data. Reduce the values of the Inbound/outbound or do not select the bidirectional option. limiter=" + linkDataLimiter.toString(linkDataDuplexMap.getTotalCount()));
        }

        watch.start("ApplicationMap MapBuilding(Response) Time");

        ApplicationMapBuilder builder = createApplicationMapBuilder(option);
        ApplicationMap map = builder.build(linkDataDuplexMap, buildTimeoutMillis);
        if (map.getNodes().isEmpty()) {
            map = buildForNoRequest(option.getSourceApplication(), builder);
        }
        watch.stop();
        if (logger.isInfoEnabled()) {
            logger.info("ApplicationMap BuildTime: {} {}", option.getSourceApplication(), watch.prettyPrint());
        }
        if (serverMapDataFilter != null) {
            map = serverMapDataFilter.dataFiltering(map);
        }
        return map;
    }

View on GitHub (pinned to 744c3d3075)

Solutions

  1. Reduce the inbound/outbound search depth parameters in the map query
  2. Remove the bidirectional option (callerOnly/inbound or outbound only)
  3. Shrink the TimeWindow (shorter from/to range)
  4. Raise the configured link-data limit (web.link.selector.... limiter config) on the Pinpoint web server if the data is genuinely needed

Example fix

// before
GET /getApplicationMap?applicationName=hub&serviceTypeName=TOMCAT&from=t1&to=t2&inbound=8&outbound=8&bidirectional=true
// after
GET /getApplicationMap?applicationName=hub&serviceTypeName=TOMCAT&from=t1&to=t2&inbound=2&outbound=2&bidirectional=false
Defensive patterns

Strategy: try-catch

Validate before calling

// client-side: keep depths small and window narrow before querying
if (inboundDepth * outboundDepth * windowBuckets > LIMIT_HINT) console.warn('risk of Too many link data');

Try / catch

try { map = mapService.selectApplicationMap(option); } catch (RuntimeException e) { if (e.getMessage().startsWith("Too many link data")) { option = option.withDepths(2, 2); map = mapService.selectApplicationMap(option); } else { throw e; } }

Prevention

When it happens

Trigger: Requesting the application map with large inbound/outbound search depths, bidirectional direction enabled, or a wide TimeWindow over a hub application, causing linkDataDuplexMap.getTotalCount() to exceed the limiter.

Common situations: UI or API calls on applications with thousands of callers/callees; default depth values too high for dense service meshes; long time windows (hours/days) aggregating many links.

Understand the failure class

Background: payload too large / request exceeds maximum size: why libraries cap bytes and how to fix oversize payloads — this error's family across 50 libraries.

Related errors


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