Skip to content

Ansible hangs on one guest

Symptom: a playbook (Semaphore or CLI) stops making progress on one LXC; pct exec <id> -- true on its node takes many seconds or times out. Seen on dsmr, wizarr and nzbforge (2026-11-27).

Cause so far, every time: the CT is thrashing at its memory limit. Processes sit in D state, lxc-attach (what pct exec and the pct_remote connection use) can't get scheduled.

Check on the node that runs the CT:

C=/sys/fs/cgroup/lxc/<id>
cat $C/memory.current $C/memory.max        # at the limit?
grep -E '^(max|oom_kill)' $C/memory.events  # climbing counters
head -1 $C/memory.pressure                  # some avg10 > ~20 = thrashing

Fix: raise the memory online (no restart needed) and watch the pressure drop:

pct set <id> --memory <MiB>
CT was now
dsmr (101, node04) 512 MiB 1536 MiB
wizarr (111, node04) 256 MiB 1024 MiB
nzbforge (153, node09) 2048 MiB 4096 MiB
semaphore (157, node11) 2048 MiB 6144 MiB + 1 GiB swap (four ~100-host playbooks at once filled 2 GiB)

These are community-script LXCs, so their size is not in this repo — re-apply after recreating one.