Stopping a container takes ~11 seconds. It should take ~1.
Why: container.stop() asks the container to shut down (SIGTERM), waits 10 seconds, then force-kills it. But the Connect image's main process is a shell script that ignores the ask, so we wait 10 seconds for nothing, every time.
Docker's own event log during a --stop (timestamps in epoch seconds):
1784826790 kill sig=15 ← Docker asks nicely (SIGTERM)
1784826800 kill sig=9 ← 10 seconds later: force-kill
1784826800 die exit=137 ← exit 137 = died by force-kill, not shutdown
This also hits command mode: every with-connect -- <cmd> run pays the 10 seconds at cleanup.
Fix: Shut Connect down directly by signaling the connect process inside the container. It exits in under a second, and the container follows. Keep a short-timeout container.stop(timeout=2) as fallback. Working code for this exists in PR #53; extract just that piece.
Stopping a container takes ~11 seconds. It should take ~1.
Why:
container.stop()asks the container to shut down (SIGTERM), waits 10 seconds, then force-kills it. But the Connect image's main process is a shell script that ignores the ask, so we wait 10 seconds for nothing, every time.Docker's own event log during a
--stop(timestamps in epoch seconds):This also hits command mode: every
with-connect -- <cmd>run pays the 10 seconds at cleanup.Fix: Shut Connect down directly by signaling the
connectprocess inside the container. It exits in under a second, and the container follows. Keep a short-timeoutcontainer.stop(timeout=2)as fallback. Working code for this exists in PR #53; extract just that piece.