-
Notifications
You must be signed in to change notification settings - Fork 416
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
Bug: electrs won't close stale sockets #1066
Comments
Is it possible you left your electrs publicly accessible? Having too many clients could have the same effect. Memory leaks (which this is also, not just resource leak) are pretty rare in Rust. |
No, I use it privately. Just a couple mobile wallets, Sparrow on desktop and a Mempool.space instance. |
Do you actually use the one from this repository or their fork? |
The one from this repo |
It could be that their client (or something else) just opens tons of connections and they never noticed because they're using the forked version which maybe handles it differently. Can you rule out this possibility? |
electrs and mempool are on the same host (lines 3, 4 and 5) |
Sorry for dumb comment, it's apparent from I don't think I'll be able to look into it soon so if @romanz or anyone else wants to go ahead. I hope restarting electrs from time to time meanwhile isn't too bad of a workaround. |
FYI |
Yeah for now I don't see any stale sockets. Will let it run for some time and report back if the issue persists. |
The issue persists: COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
node 4570 zeus 34u IPv4 83958812 0t0 TCP localhost:43726->localhost:50001 (ESTABLISHED)
electrs 22140 zeus 4u IPv4 83940052 0t0 TCP *:50001 (LISTEN)
electrs 22140 zeus 6u IPv4 83958017 0t0 TCP localhost:50001->localhost:43726 (ESTABLISHED)
electrs 22140 zeus 19u IPv4 83958017 0t0 TCP localhost:50001->localhost:43726 (ESTABLISHED)
electrs 22140 zeus 28u IPv4 105279332 0t0 TCP bitcoin:50001->10.10.20.1:39414 (CLOSE_WAIT)
electrs 22140 zeus 47u IPv4 119291099 0t0 TCP bitcoin:50001->10.10.21.69:60398 (CLOSE_WAIT)
electrs 22140 zeus 57u IPv4 118921848 0t0 TCP bitcoin:50001->10.10.20.1:42780 (CLOSE_WAIT)
electrs 22140 zeus 65u IPv4 119291032 0t0 TCP bitcoin:50001->10.10.20.1:38334 (CLOSE_WAIT)
electrs 22140 zeus 66u IPv4 119291033 0t0 TCP bitcoin:50001->10.10.20.1:43690 (CLOSE_WAIT)
electrs 22140 zeus 82u IPv4 119291094 0t0 TCP bitcoin:50001->10.10.21.69:43414 (CLOSE_WAIT)
electrs 22140 zeus 85u IPv4 119291157 0t0 TCP bitcoin:50001->10.10.21.69:60414 (CLOSE_WAIT) After restarting, it responds again. |
I still run |
I've inspected the logs and the only thing there are endless lines of
I think that even if this issue is related to the nginx proxy, electrs should clean these sockets on it's own.
|
The warning "your wallet uses less efficient method of querying electrs" is not related to this issue, this warning is logged when I was hoping to see some OS related error that could directly point to the cause. Could you provide more information that could allow it to be reproduced? like nginx proxy configuration, debug or trace level logging (if that wasn't enabled already), etc |
version:
v0.10.5
electrs
wouldn't respond to new connections, but the process was running just fine. When checking for open connections, I came across a lot of open sockets in theCLOSE_WAIT
state. After restarting the process (thus killing all stale sockets), it responded again.To Reproduce
Run it for some time with a lot of connections and disconnections?
Expected behavior
electrs
should clean up stale sockets.Configuration
System running electrs
The text was updated successfully, but these errors were encountered: