Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

bitcoind takes a long time to listen for new RPC commands. #684

katmagic opened this Issue Dec 5, 2011 · 10 comments


None yet
7 participants

katmagic commented Dec 5, 2011

After bitcoind starts, it doesn't listen on rpcport for quite a while (presumably until it synchronizes with the network).

ancow commented Dec 13, 2011

I'm pretty sure that it doesn't wait until it's synced with the network as "bitcoind getinfo" still shows a rapidly increasing block count if bitcoind hasn't been run in a while. However, judging by the disk activity, it waits until it is finished with the initial database read.


TheBlueMatt commented Dec 13, 2011

Bitcoin will do the same initialization before listening on the RPC port that it does during the splash screen of bitcoin-qt.

ancow commented Dec 13, 2011

Yeah, and having to wait 3+ mins to be able to use bitcoin just isn't funny anymore, especially since the delay will keep getting larger... :-(


laanwj commented Feb 14, 2012

It is one of the dev team priorities to speed up the startup sequence. Recent patches have already optimized this quite a lot.

I don't think this is a bug, though: what use would it be to answer RPC commands when not initialized yet? It could answer "Error - don't know yet" at most.

ancow commented Feb 14, 2012

As far as I'm concerned, the bug isn't not answering RPC earlier as much as the enormous startup time. (As soon as that issue is sorted out, bitcoind will respond sooner to RPC commands.)

Answering with an error message would have been very helpful when I was trying to figure out why bitcoind wouldn't respond to any requests.


dooglus commented Feb 26, 2012

I find that reading the large database files just before running bitcoind makes the total start up time much lower. Probably because I have enough RAM to cache the whole files in RAM, and reading them sequentially is faster than the random order that bitcoin reads them while it's starting:

md5sum ~/.bitcoin/{addr,blk}*.dat; bitcoind -daemon


jgarzik commented Jul 5, 2012

Yes, bitcoin will read and verify the databases before starting all its threads (including the RPC thread).

katmagic is right, it would be much better if there is an specific error message and not only a timeout error..!!!


laanwj commented Nov 4, 2013

Closing, as this works as intended.

@laanwj laanwj closed this Nov 4, 2013

jpentland pushed a commit to jpentland/bitcoin that referenced this issue Feb 7, 2016

Merge pull request #684 from crowning-/patch-2
Change copyright from 2015 to 2016

ptschip pushed a commit to ptschip/bitcoin that referenced this issue Aug 6, 2017

Merge pull request #684 from ptschip/dev_dbcache
dbcache performance enhancements
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment