fix(rpc): reduce default limits to prevent resource exhaustion#140
Closed
fix(rpc): reduce default limits to prevent resource exhaustion#140
Conversation
Lower max_blocks_per_filter from 10,000 to 2,000 and max_tracing_requests from 25 to 10. Under moderate load, wide getLogs queries and concurrent tracing requests monopolize database connections and block other RPC traffic. Both limits remain overridable via SIGNET_RPC_MAX_BLOCKS_PER_FILTER and SIGNET_RPC_MAX_TRACING_REQUESTS environment variables. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Member
Author
Code reviewNo issues found. Checked for bugs and CLAUDE.md compliance. 🤖 Generated with Claude Code - If this code review was useful, please react with 👍. Otherwise, react with 👎. |
Evalir
approved these changes
Apr 16, 2026
Member
|
ok with testing this for now, but we should adjust this later |
Member
which path is this? |
Member
Author
|
holding off on this pending some other tests first, if rpc perf is still bad we can explore this. setting to draft |
Member
Author
|
going to close this for now, other fixes have been sufficient. |
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.
Summary
max_blocks_per_filterdefault from 10,000 to 2,000max_tracing_requestsdefault from 25 to 10Context
Under moderate load, wide
eth_getLogsqueries (up to 10,000 blocks) monopolize database connections for extended periods, especially with the streaming path that issues one query per block. Combined with the cold storage write-drain behavior (all reads must complete before each write), a few large log queries can stall the entire RPC server.Similarly, tracing/debug requests are CPU and memory intensive. 25 concurrent tracing requests can saturate the blocking thread pool and compete with state queries for resources.
Both limits remain overridable via
SIGNET_RPC_MAX_BLOCKS_PER_FILTERandSIGNET_RPC_MAX_TRACING_REQUESTSenvironment variables for deployments that need the higher limits.Test plan
cargo +nightly fmt -- --checkcargo clippy -p signet-rpc --all-targetscargo t -p signet-rpc(35 tests + 6 doctests pass)🤖 Generated with Claude Code