From 16833501a1004a5a661a729e4fd2dbcbeaecd1d5 Mon Sep 17 00:00:00 2001 From: DanConwayDev Date: Fri, 16 Jan 2026 20:55:38 +0000 Subject: config: increase max_connections default from 2000 to 4096 Increases connection limit across all configuration sources: - src/config.rs: default_value_t = 4096 - docs/reference/configuration.md: updated default and examples - nix/module.nix: maxConnections default = 4096 - .env.example: updated default and comment This allows the relay to handle more concurrent connections and reduces the likelihood of connection exhaustion under normal load. The previous limit of 2000 was too conservative for production deployments. --- docs/reference/configuration.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'docs/reference') diff --git a/docs/reference/configuration.md b/docs/reference/configuration.md index c3001d3..c1cb712 100644 --- a/docs/reference/configuration.md +++ b/docs/reference/configuration.md @@ -931,17 +931,17 @@ Event blacklist does **not** affect NIP-11 metadata: **Description:** Maximum total connections to the relay. Prevents connection exhaustion DoS attacks. **Type:** Integer -**Default:** `500` +**Default:** `4096` **Required:** No **Examples:** ```bash -# Default: 500 connections -NGIT_MAX_CONNECTIONS=500 +# Default: 4096 connections +NGIT_MAX_CONNECTIONS=4096 # Higher limit for large public relay -NGIT_MAX_CONNECTIONS=1000 +NGIT_MAX_CONNECTIONS=8000 # Lower limit for private relay NGIT_MAX_CONNECTIONS=100 -- cgit v1.2.3