upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDanConwayDev <DanConwayDev@protonmail.com>2026-01-16 20:55:38 +0000
committerDanConwayDev <DanConwayDev@protonmail.com>2026-01-19 15:03:59 +0000
commit16833501a1004a5a661a729e4fd2dbcbeaecd1d5 (patch)
tree96117ff6ba6c8d8d1d8daab3afe3f43a04b88e24 /src
parent5897e4bccd41f1a9ebb01a11280cea929c93d2c0 (diff)
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.
Diffstat (limited to 'src')
-rw-r--r--src/config.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/config.rs b/src/config.rs
index 0014003..320661f 100644
--- a/src/config.rs
+++ b/src/config.rs
@@ -470,9 +470,9 @@ pub struct Config {
470 #[arg(long, env = "NGIT_EVENT_BLACKLIST", default_value = "")] 470 #[arg(long, env = "NGIT_EVENT_BLACKLIST", default_value = "")]
471 pub event_blacklist: String, 471 pub event_blacklist: String,
472 472
473 /// Maximum total connections to the relay (default: 500) 473 /// Maximum total connections to the relay (default: 4096)
474 /// Prevents connection exhaustion DoS attacks 474 /// Prevents connection exhaustion DoS attacks
475 #[arg(long, env = "NGIT_MAX_CONNECTIONS", default_value_t = 500)] 475 #[arg(long, env = "NGIT_MAX_CONNECTIONS", default_value_t = 4096)]
476 pub max_connections: usize, 476 pub max_connections: usize,
477} 477}
478 478