Skip to content

City should survive session logout (keep-alive config) #103

@alexsiri7

Description

@alexsiri7

Problem

The city dies when systemd kills user processes overnight. The tmux scope gets cleaned up by logind when no active login session exists.

Current workaround

loginctl enable-linger $USER — prevents systemd from killing user processes after logout.

Desired behavior

The city config should have a keep-alive option (e.g. keep_alive = true or run_as = "service") that:

  1. Automatically enables linger on gc start if needed
  2. Optionally installs a systemd user service for the supervisor
  3. Warns on gc doctor if the city is running without linger enabled

This ensures the city survives laptop lid-close, display manager session teardown, and SSH disconnects without manual sysadmin steps.

Context

City died at 00:59:46 on 2026-03-24 when systemd cleaned up the tmux scope (1.2G memory peak). All sessions stopped simultaneously. No OOM, no reboot — just logind killing user processes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/featureNew capabilitypriority/p2Medium — real problem, workaround exists

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions