<ol>
<li>Upgrade to the very latest stable version. We saw alot less memory leakage with .10 on ubuntu</li>
<li>run a cron job to restart it every night around 4:00 am est when there are fewest ransactions. This will cut down on memory leakage</li>
<li>make sure your box has at least 4 gigs of ram and a 2 gig swap partition.</li>
<li>give us some more info here. like linux distro, machine stats and what kind of rpc calls u often do.</li>
</ol>

CC BY-SA 3.0
2015-04-08T15:07:23.753Z
2015-04-08T15:07:23.753Z
SethThomasRoth
<p>I have observed that if the HTTP client sending the JSON-RPC request does not send a <code>Connection: close</code> header then the bitcoind RPC server stops responding after a number of calls. </p>

CC BY-SA 3.0
2015-04-08T18:57:14.490Z
Indeed, there seem to be some problems with certain clients and persistent connections. 0.10 disables persistent connections by default.
Pieter Wuille
CC BY-SA 3.0
2015-02-20T21:05:48.480Z
2015-02-20T21:05:48.480Z
ademar
<p>I run bitcoind on AWS on Ubuntu. The machine has 4Gb of memory and <code>free</code> shows some of it remains free. Enough disk space too.</p>

<p>Yet, I have to manually restart bitcoind quite often, because sending JSON-RPC requests returns a timeout error. That is, at first they do work, but then they don't. No matter what kind of request.</p>

<p>Has anyone ever come across this? Why does it happen? Does anybody have a plausible theory?</p>

CC BY-SA 3.0
2015-02-20T14:27:24.290Z
What version of bitcoind are you running? Also, is the blockchain caught up? (You can tell what block you're on by running `bitcoind getinfo` or `bitcoin-cli getinfo` respectively)
JohnDvorak
CC BY-SA 3.0
2015-02-20T21:21:38.380Z
Does increasing `rpcthreads` cause the problem to stop?
Nick ODell
CC BY-SA 3.0
2015-02-20T22:16:04.963Z
Some HTTP client software does not deal with the persistent connection feature that bitcoind offer. Persistant connections are off by default in 0.10 again, but can be re-enabled with -rpckeepalive.
Pieter Wuille
<bitcoind><json-rpc><ubuntu><amazon-web-services>
Bitcoind becomes non-responsive over JSON-RPC, have to manually restart all the time
orion3
# Bitcoind becomes non-responsive over JSON-RPC, have to manually restart all the time

(Asked by: username_0 on 2015-02-20)

I run bitcoind on AWS on Ubuntu. The machine has 4Gb of memory and `free` shows some of it remains free. Enough disk space too.

Yet, I have to manually restart bitcoind quite often, because sending JSON-RPC requests returns a timeout error. That is, at first they do work, but then they don't. No matter what kind of request.

Has anyone ever come across this? Why does it happen? Does anybody have a plausible theory?

**Tags:** bitcoind, json-rpc, ubuntu, amazon-web-services

> **Comments:**
> **username_1**: What version of bitcoind are you running? Also, is the blockchain caught up? (You can tell what block you're on by running `bitcoind getinfo` or `bitcoin-cli getinfo` respectively)  
> **username_2**: Does increasing `rpcthreads` cause the problem to stop?  
> **username_3**: Some HTTP client software does not deal with the persistent connection feature that bitcoind offer. Persistant connections are off by default in 0.10 again, but can be re-enabled with -rpckeepalive.  

---

## 2 answers

### Answer by username_4 on 2015-04-08. Score: 2

1. Upgrade to the very latest stable version. We saw alot less memory leakage with .10 on ubuntu
2. run a cron job to restart it every night around 4:00 am est when there are fewest ransactions. This will cut down on memory leakage
3. make sure your box has at least 4 gigs of ram and a 2 gig swap partition.
4. give us some more info here. like linux distro, machine stats and what kind of rpc calls u often do.


---

### Answer by username_5 on 2015-02-20. Score: 0

I have observed that if the HTTP client sending the JSON-RPC request does not send a `Connection: close` header then the bitcoind RPC server stops responding after a number of calls.

> **Comments:**
> **username_3**: Indeed, there seem to be some problems with certain clients and persistent connections. 0.10 disables persistent connections by default.  

---

