-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
AsyncProducer Close
blocked for infinity
#2121
Comments
expected feature, when try to close the |
We are facing an issue along similar lines with
We are not directly calling WIP details:
|
|
Our service need |
I think I came across the same issue with Sarama 1.31.0 kafka 1.1.0 with golang 1.17.5
how about the below fix
|
I believe there are two issues discussed here with similar outcomes. Default configuration of the AsyncProducer can lead to long delaysBy default the So depending on how the See #1359 for yet another example on how it can take up to 4 minutes to fail trying to connect to a 2 brokers cluster.
Unfortunately because of how the pipeline logic works, I don't think the
Deadlock on retries (specific Sarama 1.31.0)The other issue is indeed a deadlock when a
This is a regression from #2094 and I should have a fix with a simple unit test for that soon. |
I added some logs to customize the sarama, and there is some of the output:
more than 100 messages like this, I think the mount of this log has relations with the mount of messages. Later happens this kind of messages.
And finally
I think the steps like this:
|
How about add a or a method like |
From my observation, it's trying to |
We've seen this deadlock repeatedly on several Kafka clusters as soon as we picked up v1.31.x, and we haven't seen it since we rolled out back our vendored deps to v1.30.1, so there is definitely a bug in the code, it's not a problem due to a dead broker (our brokers are fine). |
FWIW this is affecting us too, an upgrade to 1.31 caused our producers to lock up. Downgrading to 1.30.1 resolved the issue |
This comment was marked as outdated.
This comment was marked as outdated.
We believe this issue is fixed in recent versions of Sarama. Feel free to re-open if you're still seeing a problem on the latest |
@dnwe, we faced the same issue with version 1.37, should I update the latest sarama version (My kafka broker version is 3.6.1)?
If I set the configuration like above, will the issue be solved? Could you give me some advice on this? |
Versions
Please specify real version numbers or git SHAs, not just "Latest" since that changes fairly regularly.
Configuration
What configuration values are you using for Sarama and Kafka?
Logs
We are testing sarama in an extremely rare scenario:
Kill -s STOP
the kafka broker process, this will make the TCP connection remain, but will not send a response.asyncProducer.Close()
we do not have a log from sarama, but have grabbed some goroutine stack, like the following one, it looks blocked on trying to receive a response from the broker.
Our purpose is that when try to close the producer, it should not be blocked for a long time, instead of return as soon as possible.
But the reality as shown in the picture above, 33 messages failed to deliver after 38minutes, and it was after the process resume by
kill -s CONT
Problem Description
The text was updated successfully, but these errors were encountered: