Supervisor probes before spawning: an external server on the port is used, never fought or killed

This commit is contained in:
mram
2026-09-21 16:06:28 +02:00
parent d7566329ae
commit 14120bf4a4
4 changed files with 64 additions and 2 deletions
+6
View File
@@ -138,6 +138,12 @@ process instead of expecting an always-on server:
freeing the VRAM ComfyUI holds. The next request restarts it.
- **Crash**: an unexpected exit is logged; the next request respawns.
gpu-turnstile's own shutdown stops the child too.
- **Coexistence**: before spawning, the URL is probed — if another server
already answers (e.g. the ComfyUI desktop app), it is used as-is and no
child is spawned; the idle watcher and shutdown only ever stop the
supervisor's own process, never the external one. The other direction —
starting the desktop app while the managed instance holds the port —
makes the *desktop* server fail to bind; gpu-turnstile is unaffected.
- Its stdout/stderr is forwarded to the log at INFO. The health check
skips the intentionally-stopped/starting states; a failed probe while
the process is alive and was previously ready is logged as DOWN.