{"record":{"id":"fb0aa4488f5e8d06","repo":"SonarSource/sonarqube","slug":"a-plugin-is-storing-excessively-large-data-in-the","errorCode":null,"errorMessage":"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.","messagePattern":"A plugin is storing excessively large data in the following measure\\(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\\.","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/step/PersistMeasuresStep.java","lineNumber":226,"sourceCode":"    if (value instanceof String strValue) {\n      int valueLength = strValue.length();\n      if (valueLength > 100_000) {\n        LOGGER.debug(\"Measure with large value persisted: metricKey={}, valueLength={}, componentKey={}, componentUuid={}\",\n          metricKey, valueLength, component.getKey(), component.getUuid());\n        if (!CORE_METRICS_WITH_LARGE_VALUES.contains(metricKey)) {\n          largeValueMetrics.add(metricKey);\n        }\n      }\n    }\n  }\n\n  private void addLargeValueMetricsWarning(Set<String> largeValueMetrics) {\n    if (!largeValueMetrics.isEmpty()) {\n      String warningMessage = String.format(\"A plugin is storing excessively large data in the following measure(s): %s. This \" +\n          \"is likely to cause significant SonarQube performance degradation and UI slowness. It is recommended to contact your \" +\n          \"administrator to disable the plugin or corresponding feature and reach out to the plugin maintainer for further assistance.\",\n        largeValueMetrics.stream().map(metric -> String.format(\"'%s'\", metric)).collect(Collectors.joining(\", \")));\n      LOGGER.warn(warningMessage);\n      if (ceTaskMessages != null) {\n        ceTaskMessages.add(new CeTaskMessages.Message(warningMessage, System.currentTimeMillis()));\n      }\n    }\n  }\n\n  private static boolean shouldNotPersist(String metricKey) {\n    return NOT_TO_PERSIST.contains(metricKey);\n  }\n\n  private void persist(Collection<MeasureDto> inserts, Collection<MeasureDto> updates) {\n    if (inserts.isEmpty() && updates.isEmpty()) {\n      return;\n    }\n    try (DbSession dbSession = dbClient.openSession(true)) {\n      for (MeasureDto m : inserts) {\n        dbClient.measureDao().insert(dbSession, m);\n      }","sourceCodeStart":208,"sourceCodeEnd":244,"githubUrl":"https://github.com/SonarSource/sonarqube/blob/184c821202192afc1c599fc912d0889b69fffa53/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/step/PersistMeasuresStep.java#L208-L244","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","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."],"exampleFix":"// before: plugin stores whole report as a measure\ncontext.newMeasure().forMetric(HUGE_REPORT_METRIC).on(file).withValue(entireJson).save();\n// after: store summary only\ncontext.newMeasure().forMetric(HUGE_REPORT_METRIC).on(file).withValue(summary).save();","handlingStrategy":"validation","validationCode":"// metric-key hygiene: cap measure payload size before saving\nif (value.length() > MAX_MEASURE_LENGTH) {\n    throw new IllegalArgumentException(\"Measure for \" + metric + \" exceeds \" + MAX_MEASURE_LENGTH + \" chars; store bulk data elsewhere\");\n}","typeGuard":null,"tryCatchPattern":"// read the CE task message to find offending metrics, then remediate the plugin\nList<CeTaskMessages.Message> msgs = ceTaskMessages.loadByTask(taskUuid);\nmsgs.stream().filter(m -> m.getMessage().contains(\"excessively large data\"))\n    .forEach(m -> log.warn(\"Plugin measure bloat: {}\", m.getMessage()));","preventionTips":["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."],"tags":["sonarqube","analysis","measures","plugins","performance"],"backgroundTag":"payload-too-large","analyzedSha":"184c821202192afc1c599fc912d0889b69fffa53","analyzedAt":"2026-09-09T12:23:51.573Z","contentChangedAt":"2026-09-09T12:23:51.573Z","schemaVersion":2},"datasetVersion":"2026-09-17T15:17:12.973Z"}