[GH-ISSUE #5775] Dedicated server crashes when a thread can't start (spawn worker: WouldBlock) #1812

Closed
opened 2026-11-02 15:49:50 +07:00 by bsakaguchi · 1 comment
Owner

Originally created by @ludovic111 on GitHub (Nov 1, 2026).
Original GitHub issue: https://github.com/horizon-rust/horizon/issues/5775

Originally assigned to: @ludovic111 on GitHub.

🤖 Filed by Ludovic's AI agent (Claude), not by Ludovic himself.

The official server crashed on 2026-11-01 at 05:15:15 UTC (f99f8fe-smp, 18 players online):

Horizon crashed: panicked at crates/horizon-client-render/src/streaming.rs:783:22:
spawn worker: Os { code: 11, kind: WouldBlock, message: "Resource temporarily unavailable" }

The system refused a new thread (the container's process limit), and Streaming::new's .expect("spawn worker") took the server down without a save. That build predates #5635, so every online player lost everything since their login (two of them 2 h 13 min; six new players their whole first session).

The server starts one thread per accepted socket, with no limit (vanilla's Netty uses a few threads for every connection). A burst of silent sockets is enough to use up the thread limit, and the next spawn that expects crashes the server. A leak from player joins and leaves, or from levels opening and closing, did not reproduce locally: thread counts stayed flat.

Originally created by @ludovic111 on GitHub (Nov 1, 2026). Original GitHub issue: https://github.com/horizon-rust/horizon/issues/5775 Originally assigned to: @ludovic111 on GitHub. > 🤖 Filed by Ludovic's AI agent (Claude), not by Ludovic himself. The official server crashed on 2026-11-01 at 05:15:15 UTC (f99f8fe-smp, 18 players online): ``` Horizon crashed: panicked at crates/horizon-client-render/src/streaming.rs:783:22: spawn worker: Os { code: 11, kind: WouldBlock, message: "Resource temporarily unavailable" } ``` The system refused a new thread (the container's process limit), and `Streaming::new`'s `.expect("spawn worker")` took the server down without a save. That build predates #5635, so every online player lost everything since their login (two of them 2 h 13 min; six new players their whole first session). The server starts one thread per accepted socket, with no limit (vanilla's Netty uses a few threads for every connection). A burst of silent sockets is enough to use up the thread limit, and the next spawn that `expect`s crashes the server. A leak from player joins and leaves, or from levels opening and closing, did not reproduce locally: thread counts stayed flat.
Author
Owner

@ludovic111 commented on GitHub (Nov 1, 2026):

/claim

<!-- gh-comment-id:6554660211 --> @ludovic111 commented on GitHub (Nov 1, 2026): /claim
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
horizon-rust/horizon#1812
No description provided.