chore(consume): add retries for connection refused from post requests#2195
Closed
spencer-tb wants to merge 1 commit intomainfrom
Closed
chore(consume): add retries for connection refused from post requests#2195spencer-tb wants to merge 1 commit intomainfrom
spencer-tb wants to merge 1 commit intomainfrom
Conversation
danceratopz
reviewed
Sep 25, 2025
Member
danceratopz
left a comment
There was a problem hiding this comment.
Hey, not such a big fan of letting these retry loops pervade more of our code. Will post an alternative with tenacity. And we can evaluate the options, see also:
| result = response_json["result"] | ||
| return result | ||
| except requests.ConnectionError as e: | ||
| if ("Connection refused" in str(e) or "Errno 111" in str(e)) and attempt < 4: |
Member
There was a problem hiding this comment.
I think this has an off by one:
Suggested change
| if ("Connection refused" in str(e) or "Errno 111" in str(e)) and attempt < 4: | |
| if ("Connection refused" in str(e) or "Errno 111" in str(e)) and attempt < 5: |
5 tasks
Member
|
@spencer-tb please check #2205 as an alternative. |
Collaborator
Author
|
CIFO #2205 |
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.
🗒️ Description
Attempts to fix sporadic connection refused errors in Hive consume simulators by adding retry logic to post requests sent to clients. This aims to address an assumed race condition where Hive reports a client as ready but the RPC service isn't quite available yet during startup, causing tests to fail with "Connection refused" errors.
🔗 Related Issues or PRs
Sporadic fails for Besu: https://hive.ethpandaops.io/#/compare/fusaka?runs=1758510938-01cbc0c3af77726a9969c9050108697a,1758441660-b4e01a5f7cea5a2ed8fc8d8c2bb4380e,1758389473-146b809e40427cf98675ec853360495e,1758207887-90de6bb128a9349d19d3b793802ef7e6,1758155899-75a28ff1edfb65c9297bf0be9f2e9f09,1758078900-e2c9d1724030ef8fac4a181f1928bd54,1757992304-a4c773a17b794af44eb5b00958f71b5c,1757903263-fa62cb0a95645c31420886e8d4f4c27a,1757817185-941983bc143dff74b7ca8a778195036f,1757733636-e801251e63ebb945ceddfc627a8e690c
✅ Checklist
toxchecks to avoid unnecessary CI fails, see also Code Standards and Enabling Pre-commit Checks:uvx --with=tox-uv tox -e lint,typecheck,spellcheck,markdownlinttype(scope):.