bitcoind can take a LONG time to load the mempool after a start. This can take several hours (especially on HDDs it seems) (corroborated here). This is evident by Progress loading mempool transactions from disk: 10% messages (after bitcoin/bitcoin#29227).
In this state, bitcoind will answer getmempoolinfo with loaded: false.
electrs is close to unusable in this state and log things like mempool sync failed: batch getmempoolentry/getrawtransaction request failed: transport error: Couldn't connect to host: Resource temporarily unavailable (os error 11). Clients will be unable to connect, and fail in very mysterious ways (unless Electrum's verbose logs are enabled and closely looked at)
electrs will eventually give up/time out and quit. If however mempool becomes available before electrs quits, it'll keep running but complain about a LOT of missing mempool entry that it couldn't load up to this point.
Electrs version
git as of 74b868c6e
To Reproduce
Steps to reproduce the behavior:
Restart bitcoind and electrs shortly after
Try to connect with clients
Wait
See error
Expected behavior
If it's not possible to gracefully work around the lack of mempool (e.g. by checking getmempoolinfo and not trying if it's unavailable yet), electrs should refuse to start until the mempool is loaded. Kind of how it also refuses to start until IBD is done. This would prevent many of the weird problems related to this.
Describe the bug Hello!
bitcoind can take a LONG time to load the mempool after a start. This can take several hours (especially on HDDs it seems) (corroborated here). This is evident by
Progress loading mempool transactions from disk: 10%
messages (after bitcoin/bitcoin#29227).In this state, bitcoind will answer
getmempoolinfo
withloaded: false
.electrs is close to unusable in this state and log things like
mempool sync failed: batch getmempoolentry/getrawtransaction request failed: transport error: Couldn't connect to host: Resource temporarily unavailable (os error 11)
. Clients will be unable to connect, and fail in very mysterious ways (unless Electrum's verbose logs are enabled and closely looked at)electrs will eventually give up/time out and quit. If however mempool becomes available before electrs quits, it'll keep running but complain about a LOT of
missing mempool entry
that it couldn't load up to this point.Electrs version git as of 74b868c6e
To Reproduce Steps to reproduce the behavior:
Expected behavior If it's not possible to gracefully work around the lack of mempool (e.g. by checking
getmempoolinfo
and not trying if it's unavailable yet), electrs should refuse to start until the mempool is loaded. Kind of how it also refuses to start until IBD is done. This would prevent many of the weird problems related to this.Configuration Nothing special
Electrum client Electrum 4.5.4
Thanks!