Skip to content

--stop wastes 10 seconds every time #56

Description

@cgraham-rs

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions