limit connections
This commit is contained in:
parent
43a6bea225
commit
98fade50f4
|
@ -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"),
|
||||
"/",
|
||||
|
|
|
@ -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;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue