apache/druid · error · RE
Max parse exceptions[%s] exceeded
Error message
Max parse exceptions[%s] exceeded
What it means
ParseExceptionHandler enforces a per-task cap on bad records: once unparseable + processed-with-error rows exceed maxAllowedParseExceptions, it throws a RequestException (RE) to halt ingestion. Saved ParseExceptionReports are attached for debugging before the throw.
Source
Thrown at processing/src/main/java/org/apache/druid/segment/incremental/ParseExceptionHandler.java:98
rowIngestionMeters.incrementUnparseable();
}
logParseExceptionHelper(e);
if (savedParseExceptionReports != null) {
ParseExceptionReport parseExceptionReport = new ParseExceptionReport(
e.getInput(),
e.isFromPartiallyValidRow() ? "processedWithError" : "unparseable",
e.isFromPartiallyValidRow()
? ((UnparseableColumnsParseException) e).getColumnExceptionMessages()
: ImmutableList.of(e.getMessage()),
e.getTimeOfExceptionMillis()
);
savedParseExceptionReports.add(parseExceptionReport);
}
if (rowIngestionMeters.getUnparseable() + rowIngestionMeters.getProcessedWithError() > maxAllowedParseExceptions) {
throw new RE("Max parse exceptions[%s] exceeded", maxAllowedParseExceptions);
}
}
@Nullable
public List<ParseExceptionReport> getSavedParseExceptionReports()
{
if (savedParseExceptionReports == null) {
return null;
}
final List<ParseExceptionReport> reports = new ArrayList<>();
for (int i = 0; i < savedParseExceptionReports.size(); i++) {
reports.add(savedParseExceptionReports.getLatest(i));
}
return reports;
}
View on GitHub (pinned to 9b90983fd2)
Solutions
- Inspect the saved ParseExceptionReports (task logs / reports endpoint) to identify the malformed records and fix the parser or input
- Raise maxAllowedParseExceptions (or set to -1 for unlimited) in tuningConfig if some bad rows are acceptable
- Correct upstream data quality or add an explicit transform/filter for the offending records
Example fix
// before
tuningConfig: { maxAllowedParseExceptions: 0 }
// after
tuningConfig: { maxAllowedParseExceptions: 1000 } Defensive patterns
Strategy: try-catch
Try / catch
try { handler.handle(re); } catch (RequestException e) { if (e.getMessage().startsWith("Max parse exceptions")) { log(handler.getSavedParseExceptionReports()); } throw e; } Prevention
- Profile input data for malformed rows before ingestion
- Tune maxAllowedParseExceptions per source reliability
- Alert on rising unparseable counts
When it happens
Trigger: Ingestion (Kafka/Kinesis/batch native) whose input contains more malformed/erroring rows than the configured maxAllowedParseExceptions, evaluated in the handle() method after each bad row.
Common situations: Dirty input data (schema drift, wrong delimiter/format), encoder producing corrupt records, or a maxAllowedParseExceptions value set too low for intentionally noisy sources.
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
- Could not convert value [%s] to long.
- Could not convert value [%s] to float.
- Could not convert value [%s] to double.
- Could not convert value [%s] to double for dimension [%s]. I
- Could not transform value for __time.
AI-assisted analysis of apache/druid@9b90983fd2 (2026-09-07).
Data as JSON: /api/errors/66cb773b7da4629b.
Report an issue: GitHub.