docs(companion): Document USR2 reexec limitation

Hot reexec runs old and new masters concurrently, so each runs its own
companion manager and every companion runs twice -- harmful for
singletons like a scheduler. Document the limitation and the SIGHUP
alternative.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Tanmoy Sarkar 2026-06-12 23:30:48 +05:30
parent a0e4806962
commit 910c6ada40

View File

@ -134,3 +134,13 @@ restarts the manager with the reloaded config.
| `control.py` | Unix socket server and JSON framing |
| `ctl.py` | `gunicorn-companion` command-line client |
## Limitations
Hot reexec (`SIGUSR2` zero-downtime upgrade) is not supported with
companions. During the overlap the old and new masters each run their own
companion manager, so every companion runs twice. For singletons such as a
scheduler this means duplicate work (e.g. double-fired jobs). Stop and
restart the master instead of reexec'ing when companions are configured, or
keep singleton companions out of the companion set. A graceful reload
(`SIGHUP`) is fine: it restarts the single manager in place.