segmentio / topicctl

Tool for declarative management of Kafka topics
MIT License
590 stars 55 forks source link

Context deadline exceeded on Metadata requests in MSK #112

Open ghost opened 1 year ago

ghost commented 1 year ago

I wanted to follow up on the issue described in #62

We're facing the same issue, and I've traced the problem to here.

I'm not sure if it's intentional (setting TTL as a request timeout), but this is breaking the app when the cluster is slow enough (small MSK Kafka instance + VPN):

[2022-12-08 18:52:58]  INFO Checking cluster ID against version in cluster
[2022-12-08 18:52:58] DEBUG Metadata request: {Addr:<nil> Topics:[]}
[2022-12-08 18:52:58] DEBUG Metadata response: <nil> (kafka.(*Client).Metadata: context deadline exceeded)
[2022-12-08 18:52:58] ERROR kafka.(*Client).Metadata: context deadline exceeded

This TTL is not configurable, so my only workaround is to fork & set a higher TTL here, but it'd help a lot if you guys could sort this out upstream.

Thanks!

cameronfleet-paxos commented 1 year ago

Thanks alot for this fix, have also been tackling with this exact same issue in recent days - the hotfix solves it!