{"record":{"id":"ef36a0735d13e655","repo":"pinpoint-apm/pinpoint","slug":"too-many-link-data-reduce-the-values-of-the-inbou","errorCode":null,"errorMessage":"Too many link data. Reduce the values of the Inbound/outbound or do not select the bidirectional option. limiter=${limiter}","messagePattern":"Too many link data\\. Reduce the values of the Inbound/outbound or do not select the bidirectional option\\. limiter=(.+?)","errorType":"exception","errorClass":"RuntimeException","httpStatus":500,"severity":"error","filePath":"web/src/main/java/com/navercorp/pinpoint/web/applicationmap/service/MapServiceImpl.java","lineNumber":105,"sourceCode":"\n        StopWatch watch = new StopWatch(\"ApplicationMap\");\n        watch.start(\"ApplicationMap Link Fetch(Out,In) Time\");\n\n        final SearchOption searchOption = option.getSearchOption();\n        LinkSelectorType linkSelectorType = searchOption.getLinkSelectorType();\n        int outSearchDepth = searchOption.getOutSearchDepth();\n        int inSearchDepth = searchOption.getInSearchDepth();\n\n        LinkDataMapProcessor outLinkProcessor = LinkDataMapProcessor.applicationNodeFilter(searchOption.isWasOnly());\n        LinkDataMapProcessor inLinkProcessor = LinkDataMapProcessor.NO_OP;\n        LinkSelector linkSelector = linkSelectorFactory.createLinkSelector(linkSelectorType, outLinkProcessor, inLinkProcessor);\n\n        TimeWindow timeWindow = option.getTimeWindow();\n        LinkDataDuplexMap linkDataDuplexMap = linkSelector.select(option.getSourceApplications(), timeWindow, outSearchDepth, inSearchDepth);\n        watch.stop();\n\n        if (linkDataLimiter.excess(linkDataDuplexMap.getTotalCount())) {\n            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()));\n        }\n\n        watch.start(\"ApplicationMap MapBuilding(Response) Time\");\n\n        ApplicationMapBuilder builder = createApplicationMapBuilder(option);\n        ApplicationMap map = builder.build(linkDataDuplexMap, buildTimeoutMillis);\n        if (map.getNodes().isEmpty()) {\n            map = buildForNoRequest(option.getSourceApplication(), builder);\n        }\n        watch.stop();\n        if (logger.isInfoEnabled()) {\n            logger.info(\"ApplicationMap BuildTime: {} {}\", option.getSourceApplication(), watch.prettyPrint());\n        }\n        if (serverMapDataFilter != null) {\n            map = serverMapDataFilter.dataFiltering(map);\n        }\n        return map;\n    }","sourceCodeStart":87,"sourceCodeEnd":123,"githubUrl":"https://github.com/pinpoint-apm/pinpoint/blob/744c3d3075e595656abb1ae331ad2c0e4c9eb996/web/src/main/java/com/navercorp/pinpoint/web/applicationmap/service/MapServiceImpl.java#L87-L123","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","solutions":["Reduce the inbound/outbound search depth parameters in the map query","Remove the bidirectional option (callerOnly/inbound or outbound only)","Shrink the TimeWindow (shorter from/to range)","Raise the configured link-data limit (web.link.selector.... limiter config) on the Pinpoint web server if the data is genuinely needed"],"exampleFix":"// before\nGET /getApplicationMap?applicationName=hub&serviceTypeName=TOMCAT&from=t1&to=t2&inbound=8&outbound=8&bidirectional=true\n// after\nGET /getApplicationMap?applicationName=hub&serviceTypeName=TOMCAT&from=t1&to=t2&inbound=2&outbound=2&bidirectional=false","handlingStrategy":"try-catch","validationCode":"// client-side: keep depths small and window narrow before querying\nif (inboundDepth * outboundDepth * windowBuckets > LIMIT_HINT) console.warn('risk of Too many link data');","typeGuard":null,"tryCatchPattern":"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; } }","preventionTips":["Use small inbound/outbound depths (1-2) for hub applications","Avoid bidirectional queries on high-fanout apps","Shrink the queried time window","Increase the server limiter only with capacity review"],"tags":["resource-limit","application-map","http-500","pinpoint"],"backgroundTag":"payload-too-large","analyzedSha":"744c3d3075e595656abb1ae331ad2c0e4c9eb996","analyzedAt":"2026-09-07T18:48:45.289Z","contentChangedAt":"2026-09-07T18:48:45.289Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}