Open shubham-dogra-s1 opened 2 months ago
@dnwe can you help with this issue? Again faced the same problem, consumers getting stuck for longer period of time.
@shubham-dogra-s1 👋🏻 thanks for getting in touch
The first thing to double check would be your consumer group lag vs the topic retention. If the group is too far behind in committed offset to keep up with the retention, then it is possible the log has been truncated and your client is trying to consume from an older offset that no longer exists
@dnwe yes that is possible.
I can see that in the lib code we are resetting the offset if we got ErrOffsetOutOfRange error https://github.com/IBM/sarama/blob/4ad35041300e1c15ba58b630745ac8eb05f30c10/consumer_group.go#L1123 Even though it is handled but still resulting in infinite loop somehow
But we recently faced the same issue with another error Request exceeded the user-specified time limit in the request
.I guess same thing is happening here as well. Attached logs below error while consuming results.priority/53: read tcp i/o timeout
. Consumer is trying to consume an offset (53) and request timed out (possibly due to offset no longer available)
On restarting the pods, consumers starting working again.
Attaching some more logs regarding Request exceeded the user-specified time limit in the request
for easier debugging
Logs from client
[ERRR][Sarama Consumer Error]: kafka: error while consuming results.priority/53: read tcp i/o timeout
[ERRR][Sarama Consumer Error]: kafka: error while consuming results.priority/0: read tcp i/o timeout
[ERRR][Sarama Consumer Error]: kafka: error while consuming results.on_demand/49: read tcp i/o timeout
[ERRR][Sarama Consumer Error]: kafka: error while consuming results.on_demand/41: read tcp i/o timeout
[ERRR][Sarama Consumer Error]: kafka: error while consuming results.on_demand/0: read tcp i/o timeout
Kafka Exporter Logs
E0411 07:12:22.868864 1 kafka_exporter.go:598] Cannot get offset of group results.on_demand tcp i/o timeout
Description
We recently noticed in our staging and prod environment that consumer groups got stuck for more than 4 days and not consuming messages from the partition. After restarting the pods it started working again.
Related Issue: #2682
Versions
Configuration
Logs
Additional Context
Faced the same behaviour with this error as well
Request exceeded the user-specified time limit in the request