[PR #4757] [MERGED] Server report: threads, and the container's limits on tasks and memory #5832

Closed
opened 2026-11-03 05:15:18 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/4757
Author: @ludovic111
Created: 10/30/2026
Status: ✅ Merged
Merged: 10/30/2026
Merged by: @ludovic111

Base: main ← Head: feat/report-threads


📝 Commits (1)

  • 393a461 Server report: threads, and the container's limits on tasks and memory

📊 Changes

1 file changed (+54 additions, -0 deletions)

View changed files

📝 crates/horizon-client/src/game/dedicated/report.rs (+54 -0)

📄 Description

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

What

horizon-report (and horizon-server report) now records a process block:

  • threads: from /proc/self/status;
  • max_processes: soft / hard, from /proc/self/limits;
  • the container's pids.current, pids.max, memory.current and memory.max from /sys/fs/cgroup.

The text summary gains a line such as 140 threads, container tasks 160, container task limit 512, max processes (soft / hard) unlimited / unlimited. All of it is Linux only; the values are null elsewhere, and then the line is left out.

Why

The official server ran out of threads tonight: starting one failed with EAGAIN, which stopped the region writer (#4726 fixes that panic). Its panel shows no thread count, and the console is the game's, so we can't look at /proc while it runs. With this, the next report shows how close the server is to its container's limit.

Test

summary test: the line is written when threads is known and left out when it isn't. pr_ready below.

pr_ready (tools/pr_ready.py --quick on ludovics-mac-mini, against origin/main at a4fec395e, 6 min 27 s)

Check Result
Scope ✅ 1 files, +54 −0
Cargo.lock ✅ unchanged
Public tree ✅
Python tests ✅ 481 passed (1 min 18 s)
rustfmt ✅ (20 s)
clippy ✅ (3 min 3 s)
tests: horizon-client ✅ 1202 passed (1 min 14 s)
doc tests ✅ 0 passed (2 s)
content root tests ➖ content root untouched
tokens.css up to date ➖ theme untouched
launcher rustfmt ➖ launcher untouched
launcher clippy ➖ launcher untouched
launcher tests ➖ launcher untouched
Parity ➖ 33 affected, to run in CI (--quick): block_removal, command_exec, composter, crafter, cursor_death, dedicated_server, dispenser, forced_end, friends_integration, hardcore_respawn, lan_integration, locator_bar and 21 more
Label player-facing: feature if players get something new, no label for a fix (release-now if urgent)

🤖 Generated with Claude Code


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/horizon-rust/horizon/pull/4757 **Author:** [@ludovic111](https://github.com/ludovic111) **Created:** 10/30/2026 **Status:** ✅ Merged **Merged:** 10/30/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `feat/report-threads` --- ### 📝 Commits (1) - [`393a461`](https://github.com/horizon-rust/horizon/commit/393a46172063cad2cebe3fe5416ec8710c0bd8a0) Server report: threads, and the container's limits on tasks and memory ### 📊 Changes **1 file changed** (+54 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game/dedicated/report.rs` (+54 -0) </details> ### 📄 Description > 🤖 Opened by Ludovic's AI agent (Claude), not by Ludovic himself. ## What `horizon-report` (and `horizon-server report`) now records a `process` block: - `threads`: from `/proc/self/status`; - `max_processes`: soft / hard, from `/proc/self/limits`; - the container's `pids.current`, `pids.max`, `memory.current` and `memory.max` from `/sys/fs/cgroup`. The text summary gains a line such as `140 threads, container tasks 160, container task limit 512, max processes (soft / hard) unlimited / unlimited`. All of it is Linux only; the values are null elsewhere, and then the line is left out. ## Why The official server ran out of threads tonight: starting one failed with EAGAIN, which stopped the region writer (#4726 fixes that panic). Its panel shows no thread count, and the console is the game's, so we can't look at `/proc` while it runs. With this, the next report shows how close the server is to its container's limit. ## Test `summary` test: the line is written when `threads` is known and left out when it isn't. pr_ready below. **pr_ready** (`tools/pr_ready.py --quick` on ludovics-mac-mini, against origin/main at a4fec395e, 6 min 27 s) | Check | Result | | --- | --- | | Scope | ✅ 1 files, +54 −0 | | Cargo.lock | ✅ unchanged | | Public tree | ✅ | | Python tests | ✅ 481 passed (1 min 18 s) | | rustfmt | ✅ (20 s) | | clippy | ✅ (3 min 3 s) | | tests: horizon-client | ✅ 1202 passed (1 min 14 s) | | doc tests | ✅ 0 passed (2 s) | | content root tests | ➖ content root untouched | | tokens.css up to date | ➖ theme untouched | | launcher rustfmt | ➖ launcher untouched | | launcher clippy | ➖ launcher untouched | | launcher tests | ➖ launcher untouched | | Parity | ➖ 33 affected, to run in CI (--quick): block_removal, command_exec, composter, crafter, cursor_death, dedicated_server, dispenser, forced_end, friends_integration, hardcore_respawn, lan_integration, locator_bar and 21 more | | Label | player-facing: `feature` if players get something new, no label for a fix (`release-now` if urgent) | 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 05:15:18 +07:00
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#5832
No description provided.