prestodb/presto · error · PrestoException
KAFKA_PRODUCER_ERROR
KAFKA_PRODUCER_ERROR
Error message
%d producer record('s) failed to send What it means
Thrown at the end of KafkaPageSink.finish() after the producer is flushed and closed: the sink's error counter recorded one or more async send failures during the write, so the query is failed instead of committing an incomplete set of Kafka records. The count of failed producer records is included in the message.
Source
Thrown at presto-kafka/src/main/java/com/facebook/presto/kafka/KafkaPageSink.java:125
}
return NOT_BLOCKED;
}
@Override
public CompletableFuture<Collection<Slice>> finish()
{
producer.flush();
producer.close();
try {
keyEncoder.close();
messageEncoder.close();
}
catch (IOException e) {
throw new UncheckedIOException("Failed to close row encoders", e);
}
if (errorCounter.getErrorCount() > 0) {
throw new PrestoException(KAFKA_PRODUCER_ERROR, format("%d producer record('s) failed to send", errorCounter.getErrorCount()));
}
return completedFuture(ImmutableList.of());
}
@Override
public void abort()
{
producer.close();
}
}
View on GitHub (pinned to 55bb57d202)
Solutions
- Check broker availability and network connectivity from the Presto worker to the Kafka cluster
- Inspect producer errors logged by KafkaProducer callbacks; the count comes from the errorCounter incremented on failed send callbacks
- Verify topic exists, is writable, and replication/ack settings are satisfiable
- Reduce backpressure: check request.timeout.ms, delivery.timeout.ms, buffer.memory, and max.block.ms producer settings
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at presto-kafka/src/main/java/com/facebook/presto/kafka/KafkaPageSink.java:125 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of prestodb/presto@55bb57d202 (2026-09-04).
Data as JSON: /api/errors/89757dc2ac9dc289.
Report an issue: GitHub.