SonarSource/sonarqube · warning
A plugin is storing excessively large data in the following…
Error message
A plugin is storing excessively large data in the following measure(s): %s. This is likely to cause significant SonarQube performance degradation and UI slowness. It is recommended to contact your administrator to disable the plugin or corresponding feature and reach out to the plugin maintainer for further assistance.
What it means
During the PersistMeasuresStep, plugins can store measure values that exceed sane size limits. When large measure values are detected, the step logs a warning naming the offending metric keys and adds a message to the CE task, because huge measures (typically custom plugins writing blobs into measures) degrade DB performance and UI responsiveness.
Solutions
- Identify the plugin owning the listed metrics (metric keys are quoted in the warning).
- Upgrade the plugin to a version that stores large data differently (e.g. in its own tables) or disable the plugin/feature.
- If the metric is yours, reduce the payload stored per measure and move bulk data elsewhere.
- Check Administration > Background Tasks for the full message listing affected measures.
- Contact the plugin maintainer if the plugin is third-party and still misbehaving.
Example fix
// before: plugin stores whole report as a measure context.newMeasure().forMetric(HUGE_REPORT_METRIC).on(file).withValue(entireJson).save(); // after: store summary only context.newMeasure().forMetric(HUGE_REPORT_METRIC).on(file).withValue(summary).save();
Defensive patterns
Strategy: validation
Validate before calling
// metric-key hygiene: cap measure payload size before saving
if (value.length() > MAX_MEASURE_LENGTH) {
throw new IllegalArgumentException("Measure for " + metric + " exceeds " + MAX_MEASURE_LENGTH + " chars; store bulk data elsewhere");
} Try / catch
// read the CE task message to find offending metrics, then remediate the plugin
List<CeTaskMessages.Message> msgs = ceTaskMessages.loadByTask(taskUuid);
msgs.stream().filter(m -> m.getMessage().contains("excessively large data"))
.forEach(m -> log.warn("Plugin measure bloat: {}", m.getMessage())); Prevention
- Never store blobs/JSON payloads in measures from custom plugins.
- Keep third-party plugins updated for the current SonarQube version.
- Add size checks in custom MeasureComputer/sensor code.
- Watch background-task warnings after installing new plugins.
When it happens
Trigger: An analysis produced measure values above the large-value threshold for the listed metrics, usually from a third-party plugin writing large payloads as measure data.
Common situations: Custom or outdated community plugins persisting JSON/XML blobs as measures; metrics accidentally fed with full file contents; plugin versions not adapted to newer SonarQube measure limits.
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
- Cannot resolve issue at line
- ############################################################…
- Insufficient privileges
- Insufficient privileges
- Live Measure Export failed after processing
AI-assisted analysis of SonarSource/sonarqube@184c821202 (2026-09-09).
Data as JSON: /api/errors/fb0aa4488f5e8d06.
Report an issue: GitHub.
Appendix: source
Thrown at server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/step/PersistMeasuresStep.java:226
if (value instanceof String strValue) {
int valueLength = strValue.length();
if (valueLength > 100_000) {
LOGGER.debug("Measure with large value persisted: metricKey={}, valueLength={}, componentKey={}, componentUuid={}",
metricKey, valueLength, component.getKey(), component.getUuid());
if (!CORE_METRICS_WITH_LARGE_VALUES.contains(metricKey)) {
largeValueMetrics.add(metricKey);
}
}
}
}
private void addLargeValueMetricsWarning(Set<String> largeValueMetrics) {
if (!largeValueMetrics.isEmpty()) {
String warningMessage = String.format("A plugin is storing excessively large data in the following measure(s): %s. This " +
"is likely to cause significant SonarQube performance degradation and UI slowness. It is recommended to contact your " +
"administrator to disable the plugin or corresponding feature and reach out to the plugin maintainer for further assistance.",
largeValueMetrics.stream().map(metric -> String.format("'%s'", metric)).collect(Collectors.joining(", ")));
LOGGER.warn(warningMessage);
if (ceTaskMessages != null) {
ceTaskMessages.add(new CeTaskMessages.Message(warningMessage, System.currentTimeMillis()));
}
}
}
private static boolean shouldNotPersist(String metricKey) {
return NOT_TO_PERSIST.contains(metricKey);
}
private void persist(Collection<MeasureDto> inserts, Collection<MeasureDto> updates) {
if (inserts.isEmpty() && updates.isEmpty()) {
return;
}
try (DbSession dbSession = dbClient.openSession(true)) {
for (MeasureDto m : inserts) {
dbClient.measureDao().insert(dbSession, m);
}View on GitHub (pinned to 184c821202)