Repository navigation
Stop the apache and fpm images right away during a long startup step - #429
Merged
mistraloz merged 1 commit intoNov 5, 2026
Merged
Conversation
The stop signals of these images (SIGWINCH, SIGQUIT) are trapped by the entrypoint, and bash only runs a trap once the foreground command ends: a docker stop during a STARTUP_COMMAND, or during the configuration of the extensions on a loaded host, waited for the end of the step and the container was killed after the stop timeout. The startup steps now run in the background, and the entrypoint waits for them.
5 of 6 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
A
docker stopof an apache or fpm image during a long startup step (e.g. aSTARTUP_COMMAND_*, or theconfiguration of the extensions on a loaded host) waited for the end of the step: the container was killed after the
stop timeout (exit code 137 after 10 s).
The entrypoint traps the stop signals of these images (
SIGWINCH,SIGQUIT), and bash only runs a trap once theforeground command ends. The startup steps now run in the background, and the entrypoint waits for them:
waitisinterrupted by the signal. The cli images were not affected.
Test plan (required)
test_stopDuringStartupCommand(tool-startup-command.sh): it fails on the current apache and fpmimages (10 s), and passes with the fix.
--cpus=0.1, a stop during the startup now takes 0.1 to 0.4 s with the exitcode 0, instead of 10 s with 137.
Checklist