Bump KafkaConsumer's request_timeout to 305000ms #1002
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The Java Consumer changed the value to 305000 in
0.10.1.0
:See the current upstream value here: https://kafka.apache.org/documentation/#configuration
This value was only changed in
KafkaConsumer
. So we don't also need to updateKafkaProducer
/KafkaClient
as the upstream Java implementations still default to30000
. The broker default is also30000
.Note:
Merging this may be slightly premature since #948 hasn't been done to add
max.poll.interval.ms
yet, but I don't see any harm in adding this now.Sessions will still timeout, this just gives the brokers/cluster a bit longer to handle things like consumer group coordination etc.
In one of our dev environments, we were seeing a lot of these timeouts at the current default of
40000
using the newKafkaConsumer
. Weirdly, the timeouts were being hit even though the consumer had no messages to consume and they were starting with default offset oflatest
.This doesn't quite feel right. It's a dev cluster, so everything on VMs and the network can be flaky/slow. But I still wouldn't have expected a consumer that was simply sitting there would be hitting this request timeout at 40 seconds.
Still, when I bumped their request timeouts up to this new
305000
value, the timeout errors went away, and the consumers remained stable as best I could tell.