From d1de9ed854addd9cf626af27b41f93f2b59f04ac Mon Sep 17 00:00:00 2001 From: Adam Malczewski Date: Sun, 28 Jun 2026 00:56:50 +0900 Subject: fix(systemd): add MemoryMax=24G circuit breaker to prevent segfault crashes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The server has a memory leak (~2.5 GB/h) that eventually triggers a Bun runtime segfault. These cgroup limits turn the uncontrolled crash into a controlled OOM-kill → clean restart via Restart=on-failure. MemoryHigh=20G (soft throttle) + MemoryMax=24G (hard cap). Machine has 33.24 GB total; 24G leaves OS headroom. --- bin/install | 2 ++ 1 file changed, 2 insertions(+) (limited to 'bin/install') diff --git a/bin/install b/bin/install index 4899939..3e2a62f 100755 --- a/bin/install +++ b/bin/install @@ -104,6 +104,8 @@ EnvironmentFile=/etc/dispatch/env WorkingDirectory=/var/lib/dispatch Restart=on-failure RestartSec=5 +MemoryHigh=20G +MemoryMax=24G StandardOutput=journal StandardError=journal -- cgit v1.2.3