Skip to content

Run the app services under an init so finished children get reaped - #179

Merged
n8bar merged 1 commit into
mainfrom
claude/worker-init-reap
Sep 6, 2026
Merged

n8bar merged 1 commit into
mainfrom
claude/worker-init-reap

Conversation

@n8bar

@n8bar n8bar commented Sep 6, 2026

Copy link
Copy Markdown
Owner

Summary

  • init: true on the shared x-app anchor in compose.production.yaml, so app, queue, and scheduler get docker-init as PID 1.
  • schedule:work and queue:work are not inits: children that finish get reparented to them and are never reaped. Each scheduler tick leaves one zombie, and on a host where the container user maps to a real account those count against its process limit until nothing under that user can fork.
  • ProductionComposeHealthcheckTest now asserts the anchor carries init: true.

Verification

  • docker compose -f compose.production.yaml config shows init: true resolved on app, queue, and scheduler.
  • sail artisan test --filter=ProductionComposeHealthcheck: 3 passed.

Compose-only change: rolling it out is up -d with the updated file; no image change.

🤖 Generated with Claude Code

https://claude.ai/code/session_012bBptf9B3BtyeQaTWMrosd

schedule:work and queue:work sit at PID 1 in their containers and never
wait() for children that were reparented to them; each scheduler tick
leaves one zombie, and on a host where the container user maps to a real
account those zombies count against its process limit until nothing under
that user can fork. init: true on the shared anchor puts docker-init in
front of all three services. ProductionComposeHealthcheckTest guards it.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012bBptf9B3BtyeQaTWMrosd
@n8bar
n8bar merged commit 6155972 into main Sep 6, 2026
1 check passed
@n8bar
n8bar deleted the claude/worker-init-reap branch September 6, 2026 06:05
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