Skip to content

supervisord program improvement: Ensure child processes are terminated on stop/restart - #108

Merged
fqjony merged 6 commits into
latestfrom
supervisord-config-improvements
Nov 17, 2025
Merged

supervisord program improvement: Ensure child processes are terminated on stop/restart#108
fqjony merged 6 commits into
latestfrom
supervisord-config-improvements

Conversation

@fqjony

@fqjony fqjony commented Nov 17, 2025

Copy link
Copy Markdown
Contributor

This PR updates the supervisord configuration to ensure services restart reliably.

The Problem

When supervisord stops a service, it defaults to sending the stop signal only to the main parent process.

Any child processes (like a web server, background worker, etc.) would be orphaned, keep running, and hold onto network ports. This caused subsequent restarts to fail with an EADDRINUSE ("address already in use") error.

The Solution

This change adds two flags to the [program:app] configuration:

stopasgroup=true: Tells supervisord to send the stop signal to the entire process group, including all child processes.

killasgroup=true: As a fallback, ensures the entire group is killed if the graceful stop fails.

This guarantees that all processes are properly terminated, freeing up ports and allowing supervisord to restart services cleanly. This fix is application-agnostic and improves reliability for any service that spawns child processes.

Other Changes

  • Google SDK -> 547.0.0
  • YQ -> 4.48.2
  • Github dependencies upgrade

@fqjony
fqjony requested a review from a team November 17, 2025 12:41
@fqjony fqjony self-assigned this Nov 17, 2025
@fqjony fqjony added enhancement New feature or request dependencies Pull requests that update a dependency file github_actions Pull requests that update GitHub Actions code docker Pull requests that update docker code labels Nov 17, 2025
kavaribes
kavaribes previously approved these changes Nov 17, 2025
Comment thread .github/workflows/release.yml Dismissed
Comment thread .github/workflows/release.yml Dismissed
@fqjony
fqjony merged commit 04fa939 into latest Nov 17, 2025
5 checks passed
@fqjony
fqjony deleted the supervisord-config-improvements branch November 17, 2025 15:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file docker Pull requests that update docker code enhancement New feature or request github_actions Pull requests that update GitHub Actions code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants