bitpay / insight-api

The bitcoin blockchain API powering Insight
https://github.com/bitpay/insight
590 stars 1.05k forks source link

Possible memory leak? #292

Open orweinberger opened 9 years ago

orweinberger commented 9 years ago

I'm running an insight api server locally and querying it very frequently to parse the blockchain. My queries cover the /addr/, /tx/ and /block-index/ endpoints. I'm currently not utilizing the socket.io connection.

When I launch the server and wait for it to completely load, I can see that the memory usage is about 103mb. After a night of querying it, when in idle, it uses about 1.5GB of memory.

Unfortunately I don't have specific details or guesses with regards to where the leak is (or if it even exists).

orweinberger commented 9 years ago

Just noticed that even when completely idle and even though I haven't even queried it, it keeps consuming more and more memory:

Uptime Memory Usage
13s 103.281 MB
4m 109.648 MB
7m 110.145 MB
10m 111.145 MB
12m 111.766 MB
14m 112.281 MB
lirazsiri commented 9 years ago

I've noticed that too. I've been working around this on blockexplorer.com by setting up PM2 to --max-memory-restart after the process size reaches 500MB. Before that I let it balloon in size and it peaked out at 2.4GB RAM and failed after running out of file descriptors (which you can also adjust).

braydonf commented 8 years ago

Curious to know if there are still any issues with the latest version.