Replies: 2 comments 11 replies
-
I can reproduce this problem. The root cause seems to be a confirm notification blocked on sending to a channel. Channel close tries to nack and close all outstanding confirm notifications (since they haven't been delivered to the user), and acquires a mutex lock on the |
Beta Was this translation helpful? Give feedback.
-
Hi, I still have this problem.
The code is taken from https://github.com/rabbitmq/rabbitmq-tutorials/blob/main/go/send.go |
Beta Was this translation helpful? Give feedback.
-
Using the document example running against a local docker container:
docker run -p5672:5672 -p 15672:15672 -p5671:5671 -p15692:15692 rabbitmq:3.9.17-management
, putting the server into a blocking situation causes thechannel.Close()
to hang and not finish.Steps to reproduce:
rabbitmqctl set_vm_memory_high_watermark 0.00000001
rabbitmqctl set_vm_memory_high_watermark 0.4
queue.Close()
At this point, the code will close the
done
channel but will hang on thequeue.channel.Close()
command.Even if we wrap this in a context timeout to allow the calling code finish, if this is a long running process, this could cause leaks over time, especially if there are multiple channels that end up in this situation due to a blocked server.
This is also not the only scenario that can case a
channel.Close()
call to hang.Best practices? TCP settings?
Beta Was this translation helpful? Give feedback.
All reactions