Safety Mode & Zombie Reconciliation
ACT continuously monitors the state of your servers to ensure the containers running on them match the expected state in the database. When it finds a container that ACT manages (labeled act.managed=true) but which does not correspond to any active deployment in the database, it considers it a Zombie Container.
Zombie Reconciliation
Under normal operation, ACT automatically removes Zombie Containers to free up resources. This keeps your servers clean and prevents “drift”.
Safety Mode Protection
In certain scenarios, such as restoring the ACT database from an older backup, there might be a massive discrepancy between the database (which thinks nothing is running) and the servers (which have 50 live containers).
If ACT were to blindly follow the “Reconciliation” logic, it would delete all 50 containers, causing a catastrophic outage.
To prevent this, ACT implements a Safety Mode:
Trigger Condition
Safety Mode is triggered automatically for a specific server if:
- >50% of the managed containers on that server are detected as zombies.
- There are more than 3 zombie candidates (prevents false positives on empty servers).
What Happens?
- No Deletion: ACT will skip the auto-pruning process for that server. The zombie containers will remain running.
- Alert: A system alert will be generated (visible in the Dashboard status).
- Logs: Use
docker ps -a --filter label=act.managed=trueon the server to investigate.
How to Resolve
review the “zombies”.
- If they are indeed garbage: You can manually delete them via Docker CLI, or manually synchronize the database state (e.g. by re-deploying services). Once the ratio drops below 50%, ACT will resume auto-cleanup.
- If the database is wrong: You might need to re-import or re-deploy the services so the database tracks them correctly again.