Description
Running producer to produce messages. after that reset the net. use lsof will see some closed TCP connection. and they will never disappear until restart the process.
| Sarama |
Kafka |
Go |
| release/1.45.1 |
|
|
Problem Description
The function LeastLoadedBroker, if the client.brokers is empty, then will use seedBroker
|
_ = client.seedBrokers[0].Open(client.conf) |
to connect the broker by create a new TCP. after that, the created TCP connection will never close. if net reset, the closed TCP will never release. So I found use
RefreshBrokers func can fix the issue. but not every time. some closed TCP still can not release. My question is :
- Is there connection leaked?
- if so, anyway to fix it except
RefreshBrokers func.
Description
Running producer to produce messages. after that reset the net. use lsof will see some closed TCP connection. and they will never disappear until restart the process.
Problem Description
The function
LeastLoadedBroker, if the client.brokers is empty, then will use seedBrokersarama/client.go
Line 770 in d6ca80a
RefreshBrokersfunc can fix the issue. but not every time. some closed TCP still can not release. My question is :RefreshBrokersfunc.