bitcoind stops responding



Summary:

The context is a log from Bitcoin, where the `getinfo` RPC function takes more than two seconds to return. The circumstances leading to this delay include receiving a block, committing 1015 changed transactions to the coin database, and setting a new best chain. During this process, `ThreadFlushWalletDB` locks the wallet database, causing `getinfo` to wait until it completes to finish calling `GetOldestKeyPoolTime()`. The author suggests some ideas to reduce the time taken by `getinfo`, including closing and reopening the database asynchronously rather than synchronously, removing unnecessary options from BDB, and experimenting with an optional boolean parameter for `getinfo` that could skip gathering information that may prolong the call.


Updated on: 2023-06-07T17:12:25.285793+00:00