Kafka Error INVALID_COMMIT_OFFSET_SIZE
Error code 28 · Non-retriable Consumer
The committing offset data size is not valid.
Common Causes
- Committing offsets for too many partitions in a single OffsetCommit request, causing the total batch size to exceed broker limits
- Large custom metadata attached per partition in OffsetCommit requests, inflating the overall request size
- Consumer subscribed to a very high number of topic-partitions attempting to commit all offsets at once
Solutions
- Reduce the number of partitions committed at once by batching offset commits across multiple requests instead of committing all partitions in a single call
- Reduce or eliminate custom offset metadata per partition; keep metadata minimal or empty to stay within size limits
- If consuming from many partitions, split consumers across multiple consumer groups or commit offsets in smaller partition subsets
Diagnostic Commands
# Check how many partitions the consumer group is assigned
kafka-consumer-groups.sh --bootstrap-server localhost:9092 --describe --group <group-id> | wc -l
# Look for commit offset size errors in logs
grep 'INVALID_COMMIT_OFFSET_SIZE\|commit offset' /var/log/kafka-consumer.log | tail -20
Debugging Kafka errors? Conduktor Console gives you real-time visibility into your cluster. Explore all errors in the Error Decoder.