Skip to content

0.29.1: stop restarting a service that never comes up - #4

Merged
benbuschmann merged 1 commit into
mainfrom
fix-restart-loop
Nov 1, 2026
Merged

benbuschmann merged 1 commit into
mainfrom
fix-restart-loop

Conversation

@benbuschmann

Copy link
Copy Markdown
Owner

A service that starts but never becomes ready was stopped and started forever, one cycle per ready_timeout_s: the start timed out, the next request's wake failed, and GapRunner restarted it. This happens when an exclusive window ends while a process GapRunner doesn't control still holds the GPU, or when the engine can't load.

Restarts are now capped by a new engine setting, max_restarts (default 3). After that GapRunner stops running stop_cmd/start_cmd, sends an error alert and logs service_restart_gave_up. Requests still try a wake every dead_retry_s, so a service started by hand is picked up. The count resets when the service answers.

Tests: tests/test_restart_cap.py (fails on main, passes here); full suite 198 tests OK.

…rts tries

A service whose start timed out was restarted on the next failed wake, then timed out again, forever: one
stop/start cycle per ready_timeout_s. Seen with an exclusive window that ends while another process still
holds the GPU. Restarts are now capped (max_restarts, default 3); then GapRunner alerts and leaves it to
requests' wakes every dead_retry_s. The count resets when the service answers.
@benbuschmann
benbuschmann merged commit ae383be into main Nov 1, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant