Skip to content

v1.4.3 — Systemd Crash Loop Fix

Latest

Choose a tag to compare

@xenitV1 xenitV1 released this 01 Jun 21:18

Fixed

Critical: Systemd crash loop when proxy already running

When a manually-started proxy was already listening on port 8765, the systemd service would fail with EADDRINUSE, exit(1), and retry every 3 seconds indefinitely — causing thousands of restarts per session (7,580 recorded in one boot cycle), inotify watch exhaustion, and system instability.

Three-layer fix

  1. server.ts — Pre-flight health check before binding. If a healthy proxy is already on the port, exit(0) so systemd treats it as success
  2. setupService (CLI) — Added StartLimitIntervalSec=30 + StartLimitBurst=5 to systemd unit. Also skips auto-restart during install if proxy is already running
  3. cmdStart (CLI) — Calls systemctl --user reset-failed before starting, clearing stuck failed state

Verified

  • NRestarts=0 (previously 7,580)
  • Clean exit(0) on port conflict — no crash loop
  • systemd correctly manages proxy lifecycle

Full Changelog: v1.4.2...v1.4.3