We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents c63f546 + 47cfa97 commit b9c08d6Copy full SHA for b9c08d6
2 files changed
.gitignore
@@ -1,2 +1,3 @@
1
/target
2
+.cargo/config.toml
3
.claude/plans/
ant-cli/src/main.rs
@@ -15,7 +15,14 @@ use ant_core::data::{
15
};
16
use cli::{Cli, Commands};
17
18
-#[tokio::main]
+/// Force at least 4 worker threads regardless of CPU count.
19
+///
20
+/// On small VMs (1-2 vCPU), the default `num_cpus` gives only 1-2 worker
21
+/// threads. The NAT traversal poll() function does synchronous work
22
+/// (parking_lot locks, DashMap iteration) that blocks its worker thread.
23
+/// With only 1 worker, this freezes the entire runtime — timers stop,
24
+/// keepalives can't fire, and connections die silently.
25
+#[tokio::main(flavor = "multi_thread", worker_threads = 4)]
26
async fn main() {
27
let code = match run().await {
28
Ok(()) => 0,
0 commit comments