Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

jsonrpc: unlimit the number of concurrent jsonrpc requests #21012

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions crates/sui-json-rpc/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -206,8 +206,13 @@ impl JsonRpcServerBuilder {
let rpc_middleware = jsonrpsee::server::middleware::rpc::RpcServiceBuilder::new()
.layer_fn(move |s| MetricsLayer::new(s, metrics.clone()))
.layer_fn(move |s| TrafficControllerService::new(s, traffic_controller.clone()));
let service_builder =
jsonrpsee::server::ServerBuilder::new().set_rpc_middleware(rpc_middleware);
let service_builder = jsonrpsee::server::ServerBuilder::new()
// Since we're not using jsonrpsee's server to actually handle connections this value
// is instead limiting the number of concurrent requests and has no impact on the
// number of connections. As such, for now we can just set this to a very high value to
// disable it artificially limiting us to ~100 conncurrent requests.
.max_connections(u32::MAX)
.set_rpc_middleware(rpc_middleware);

let mut router = axum::Router::new();
match server_type {
Expand Down
Loading