Skip to content

sui_v1.40.0_1734583250_ci

## Description

Make it possible to configure the number of max accepted connections
over the command-line args. After this change, the RPC now accepts two
connection count parameters (one for the DB connection pool, and one for
its own accepted connections) so we also tweak the DB connection pool
argument name to make the difference clearer.

This change also introduces defaults for the RPC's args, for
convenience.

## Test plan

By default:

```
sui$ cargo run -p sui-indexer-alt-jsonrpc -- \
  --database-url $DB
2024-12-18T14:50:26.798833Z  INFO sui_indexer_alt_jsonrpc: Starting JSON-RPC service on 0.0.0.0:6000
2024-12-18T14:50:30.565621Z  INFO connection{remote_addr=127.0.0.1:49379 conn_id=0}: jsonrpsee_server::server: Accepting new connection 1/100
```

Overridden:

```
sui$ cargo run -p sui-indexer-alt-jsonrpc -- \
  --database-url $DB
  --max-rpc-connections 200
2024-12-18T14:50:26.798833Z  INFO sui_indexer_alt_jsonrpc: Starting JSON-RPC service on 0.0.0.0:6000
2024-12-18T14:50:30.565621Z  INFO connection{remote_addr=127.0.0.1:49379 conn_id=0}: jsonrpsee_server::server: Accepting new connection 1/200
```
Assets 2
Loading