-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Never closed sockets when remote ZYRE node goes offline #4729
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
Comments
It sounds reasonable to me. Have to considered submitting a change that fixes the problem? |
@keith-dev I can provide a |
stephan57160
added a commit
to stephan57160/libzmq
that referenced
this issue
Dec 20, 2024
See PR 4761. |
stephan57160
added a commit
to stephan57160/libzmq
that referenced
this issue
May 28, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Issue description
On our ZYRE production server, once in a while, we observe never-closed sockets.
Sometimes, it goes up to 200 sockets to the same remote ZYRE node.
Environment
Minimal test code / Steps to reproduce the issue
What's the actual result? (include assertion message & call stack if applicable)
Socket from node B to node A is never closed, even if
Note:
This is not visible if application on node B is properly stopped (thx to TCP layer for sending TCP RESET).
What's the expected result?
Sockets from remote nodes should be automatically closed when the remote disappear:
I failed to have a working implementation in any of those 2 cases.
Possible solution
I digged into LIBZMQ and ZYRE for quite some time.
I tried different approaches, but I always failed to get an access to the ACCEPT()ed socket
in this particular scenario.
Finally, I have a 'draft' possible workaroung, that enables TCP KEEPALIVE right after a particular ACCEPT() in
tcp_listener.cpp
.Basically, the idea is like:
The text was updated successfully, but these errors were encountered: