limit connections

This commit is contained in:
Astro 2022-11-03 20:48:36 +01:00
parent 43a6bea225
commit 98fade50f4
2 changed files with 5 additions and 3 deletions

View File

@ -51,6 +51,7 @@ async fn main() {
systemd_status("Starting HTTP client");
let client = reqwest::Client::builder()
.timeout(Duration::from_secs(30))
.pool_max_idle_per_host(0)
.user_agent(concat!(
env!("CARGO_PKG_NAME"),
"/",

View File

@ -10,10 +10,10 @@ let
max_workers = 16;
};
hunterSettings = lib.recursiveUpdate hunterDefaultSettings cfg.hunter.settings;
hunterConfigFile = builtins.toFile "hunter.yaml" (
builtins.toJSON (
lib.recursiveUpdate hunterDefaultSettings cfg.hunter.settings
)
builtins.toJSON hunterSettings
);
in
@ -78,6 +78,7 @@ in
RestrictRealtime = true;
LockPersonality = true;
MemoryDenyWriteExecute = true;
LimitNOFile = 2 * hunterSettings.max_workers;
};
};
};