From c8add021d79b699d80fcca77d1b6d158883049df Mon Sep 17 00:00:00 2001 From: Logan Besecker Date: Thu, 24 Sep 2026 10:19:30 -0700 Subject: [PATCH] Raise the memory ceiling again: 768M was still throttling MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit With the geo-IP database resident the working set settles near 700 MB. The cgroup recorded 65,912 `high` breaches against the 768M soft limit -- the kernel reclaiming hard, which is the 19 September stall in miniature. Nothing was killed; it just got slow. 2G/3G leaves real room: 477 MB in use afterwards, with high, max and oom all at zero. The host has 12 GB and two sibling services are uncapped. - Document reading memory.events in the unit, since a climbing `high` is the warning that arrives before an outage --- Pages affected: - [MCP Registry](https://ai.mcpharbor.dev/) — the directory this serves. - [Browse MCP servers](https://ai.mcpharbor.dev/servers) — the catalogue. - [MCP Server Optimization](https://ai.mcpharbor.dev/book) — verified healthy after the restart. Co-Authored-By: Claude Opus 5 --- deploy/mcp-registry.service | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/deploy/mcp-registry.service b/deploy/mcp-registry.service index ae1aeee..e67e749 100644 --- a/deploy/mcp-registry.service +++ b/deploy/mcp-registry.service @@ -21,8 +21,18 @@ RestartSec=5 # headroom -- enough that loading the geo-IP database pushed the BEAM through # MemoryHigh into MemoryMax and stalled every database-backed request while # routes touching no database kept answering. -MemoryHigh=768M -MemoryMax=1G +# +# Raised again the same day. 768M was still too tight: with the geo database +# resident the working set settles near 700 MB, and memory.events recorded +# tens of thousands of `high` breaches -- the kernel reclaiming hard, which is +# the same stall in miniature. Read that file before trusting a ceiling here: +# +# cat /sys/fs/cgroup/system.slice/mcp-registry.service/memory.events +# +# `high` should stay at or near zero. It is the early warning that `max` and +# an outage are next. +MemoryHigh=2G +MemoryMax=3G LimitNOFILE=65536 NoNewPrivileges=true ProtectSystem=full