electrumx: electrumx memory leak

I am using latest electrumX from git:
commit 39d8ec50edcba0eabc3787eeb9229caf6f81cf42 (HEAD -> master, origin/master,$
Merge: 10f0faa f146e82
Author: ghost43 <somber.night@protonmail.com>
Date: Fri Oct 23 15:42:01 2020 +0000
Have to restart electrumX every day otherwise it will eat all memory. My environment variables:
datadir="/home/nv01/.electrumx"
export COIN=BitcoinSegwit
export DAEMON_URL=http://(my bitcoin core credentials)@localhost:8332
export NET=mainnet
export CACHE_MB=1200
export DB_DIRECTORY=$datadir
export SSL_CERTFILE=$datadir/fullchain.pem
export SSL_KEYFILE=$datadir/privkey.pem
export LOG_SESSIONS=300
export LOG_LEVEL=INFO
export LOG_FORMAT="%(asctime)s:%(levelname)s:%(name)s:%(message)s"
export BANDWIDTH_UNIT_COST=5000
export REQUEST_TIMEOUT=30
export DROP_CLIENT="3\.[0-4]\.\d+"
export DROP_CLIENT_UNKNOWN=YES
export SERVICES=ssl://:50002,rpc://:8000
export REPORT_SERVICES=ssl://(my address):50002
export EVENT_LOOP_POLICY=uvloop
export MAX_SESSIONS=1000
ulimit -n 10000
OS: Debian GNU/Linux 10 (buster) x86_64 Kernel: 5.8.0-0.bpo.2-amd64
$ python3 --version Python 3.7.3
Anyt suggestions how to debug this?
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 27 (7 by maintainers)
Aw man, what did we do! Thanks, @curious0101
So there are three logical explanations AFAICT why this started happening only recently
I can reproduce btw, am getting a memory leak too. I have tried going back to before adding the cache commits. Tested with https://github.com/spesmilo/electrumx/commit/029ffb3874aa9ba67774006cafad02f226daa5e1, but still there is a leak.
For me, it takes ~4 hours to get to 4 GB, so it is growing a lot slower here. This unfortunately makes testing harder 😕