Repository navigation
Conversation
When -rpcworkqueue is full, bitcoind answers HTTP 503 with the body "Work queue depth exceeded". into_jsonrpc_body turned every status other than 200 and 500 into a plain error, so retry_request returned it instead of retrying, and electrs exited: ERROR server failed: Error: request failed "HTTP/1.1 503 Service Unavailable": ... = "Work queue depth exceeded" Seen on testnet4 with bitcoind started with -rpcworkqueue=2 -rpcthreads=1 while other clients called getblock. A busy bitcoind recovers once its queue drains, so treat 503 like a dropped connection: the singleton path waits, reconnects and retries, as it does during warmup (-28), and the client path reports the daemon as unavailable.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When bitcoind's RPC work queue (
-rpcworkqueue) is full, it answers HTTP 503 with the bodyWork queue depth exceeded.into_jsonrpc_bodyonly accepts 200 and 500, so the 503 became a plain error,retry_requestreturned it instead of retrying, and electrs exited:I hit this on testnet4 with bitcoind started with
-rpcworkqueue=2 -rpcthreads=1while other clients calledgetblock. It happened on both runs.A busy bitcoind recovers once its queue drains, so this maps 503 to
ErrorKind::Connection. The singleton path then waits, reconnects and retries, as it already does during warmup (-28), and the client path reports the daemon as unavailable.Test:
recv_treats_a_full_work_queue_as_a_connection_errorfails without the change and passes with it. All daemon tests pass.Related: #245.