fix(sowerd): give the service a soft heap ceiling on every install path

The 2026-10-12 OOM killed the host, not the service: sowerd had no memory
ceiling anywhere while the sower client has had SOWER_MEMORY_LIMIT_MB since
d0031e4. Put a GOMEMLIMIT on the unit the installer writes and on the
packaged unit, so a runaway heap degrades sowerd instead of OOM-killing the
machine it runs on. kr already carries the same value through a drop-in.
This commit is contained in:
wweir
2026-10-12 17:58:08 +08:00
parent 28c4f9e8ca
commit 3c869cd32d
6 changed files with 53 additions and 3 deletions
+3
View File
@@ -191,6 +191,9 @@ Wants=network-online.target
[Service]
Type=simple
ExecStart="%s" -c "%s"
# Soft heap ceiling: a runaway heap degrades this service instead of
# OOM-killing the host (see docs/security.md, Connection Resource Bounds).
Environment=GOMEMLIMIT=512MiB
Restart=always
RestartSec=5s