Skip to content

TCP handle leakage for "stale" connections #94

@shsmith

Description

@shsmith

I have noticed that over time the number of IP handles reported by lsof continues to grow and far exceeds the number of connections reported by the sessions RPC.

One IP in particular appears over 1000 times, even though there is no active session for the IP.

Here are the logs from 2 days ago when this IP briefly connected:

INFO:ElectrumX:[21536] SSL 41.144.95.105:52782, 666 total
INFO:ServerManager:closing stale connections [19859, 21536, 20904, 21120, 6123, 21278, 21097, 21124, 21481]

This IP does not appear at all after that.

Possibly related: the "subs" value in the getinfo RPC is much higher than the sum of subs for the sessions RPC. I suspect these are related to the stuck TCP handles.

Live Munin charts: http://vps.hsmiths.com:49001/munin/electrumx-day.html

A snapshot from near block 446220:

full lsof output: http://vps.hsmiths.com:49001/lsof.txt
getinfo output: http://vps.hsmiths.com:49001/getinfo
sessions output: http://vps.hsmiths.com:49001/sessions

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions