The app froze six times on 14-15 Nov with its main thread stuck in
__mem_cgroup_handle_over_high: memory sat at 790-850 MiB against the
unit's 768M memory.high, so the kernel throttled it instead of killing
it, and every stop needed SIGKILL. V8 sizes its heap from the machine's
RAM, not the cgroup, so it never ran a full collection before crossing
the throttle point. Run node with --max-old-space-size=512, self-healed
into the box launch.sh on each deploy like the header-size flag.
launch.sh did `unset HOSTNAME` before starting the standalone server. That
does not default to localhost — Next's standalone server reads HOSTNAME as
the bind address, and unsetting it falls back to Next's own default,
0.0.0.0 (every interface). Confirmed against the actual bind on the box:
orangecat-app was listening on 0.0.0.0:4003, not 127.0.0.1:4003 like every
other app in the fleet.
Not an active incident — ufw's default-deny only allows 22/80/443, so the
port was never actually internet-reachable — but relying on the firewall
alone to cover a bind-address mistake is exactly the kind of thing that
breaks quietly the day firewall config changes for an unrelated reason.
Already applied directly to the running box (this file is vendored TO the
box, not FROM it on regular deploys — deploy-selfhost.sh preserves whatever
launch.sh is already there rather than overwriting it from the repo, per
its own comment). This commit is the repo catching up to what's already
live, so the next full box provision starts from the correct file instead
of reintroducing the bug.
Same fix shipped for fleetcrown (bitbaum/fleetcrown#437) — this repo had
the identical bug, independently.
Claude-Session: https://claude.ai/code/session_01Y9rKLxddothnXEtY6KDziN
Co-authored-by: Georgy Butaev <41178744+g-but@users.noreply.github.com>
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
Box-side resilience prep from the DevOps audit (advisory + SSOT artifacts —
zero runtime change; the founder applies the runbook steps box-side):
- Vendor the OrangeCat systemd unit + launcher into the repo (they lived ONLY on
the box), so a fresh-box rebuild is a scripted install, not archaeology:
scripts/systemd/orangecat-app.service, scripts/systemd/launch.sh (verbatim
from the box; no secrets — env is externalized to .env).
- docs/operations/RESILIENCE.md — actionable, copy-paste runbook for the four
proactive gaps: (1) single-box SPOF → scripted OC bring-up + publish RTO +
optional warm standby; (2) off-site backups are deletable → B2 Object-Lock +
non-delete key + off-box retention + ≥2 RESTIC_PASSWORD copies; (3) root
deploy credential → non-root oc-deploy user with scoped sudoers; (4) the
fleetcrown-owned backup pipeline dependency + the container-dump must-hold.
Full box-wide IaC stays in fleetcrown's shared hetzner toolkit (noted), not
forked here.
Co-authored-by: Georgy Butaev <41178744+g-but@users.noreply.github.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>