-
-
Notifications
You must be signed in to change notification settings - Fork 527
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hangs on disconnect with inflight requests #918
Comments
Are you calling |
No, but i believe it is automatic as system failed at some point due to my chaos test (most likely socket has been ended) and it is trying to reconnect, but before it can do above it needs to disconnect and that step is never completed due to continues send requests, this causes whole producer to stall... We were running 1.14.0 in test env few days ago and had small network issue which caused minor outage for short time afterwords consumer recovered properly but producer was completely stack with infinity disconnections for over a day, required manual restart on our side. |
Exactly the same code is working correctly with version 1.12.0, after some investigation the issue was narrowed down to the first post. |
It makes sense, we have to treat timeouts differently. We were planning a |
Got the same issue. Basically what happened was, we lost connection to brokers for couple of minutes and then it came back. But it was already too late, all the connections were disconnected and this message was being logged over and over. If there is a fix already available for this, 1.14.1 sounds like an idea. Thanks in advance |
Describe the bug
Looks like 5f0979f has introduced bug. I have been running chaos tests on latest kafkajs version (1.14.0) and picked up new issue. If i block kafka port for some time while producing data and will not stop producing data then it will fail and will infinitely try to disconnect from kafka as it is infinitely waiting for pending/inflight requests as i am not stopping producing data, here is just some extract of logs important part
Waiting for pending requests
and it never gets resolved:You can try to just do some thing like that where you retry publish on error:
And with above you should be able to see that we almost always have inflight requests so it can not properly disconnect, you should be really lucky to get disconnected :) ...
This issue persists even if i have timeout 100ms.
Environment:
The text was updated successfully, but these errors were encountered: