Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add signal option to horizon:purge (e.g. SIGKILL) #1226

Merged
merged 2 commits into from
Dec 14, 2022

Conversation

crishoj
Copy link
Contributor

@crishoj crishoj commented Dec 13, 2022

In some cases, queue workers may become stuck in a state where they don't respond to the SIGTERM signal sent by the horizon:purge command. We've had a server where swap and memory was nearly exhausted by rogue orphans.

To make cleaning up easier, I propose adding a --signal= option to horizon:purge.

The most obvious use-case is to forcefully kill rogue orphan queue workers:

php artisan horizon:purge --signal=SIGKILL

The option accepts both numeric (--signal=9) and text (--signal=SIGKILL) signal identifiers, and defaults to SIGTERM, to ensure backwards compatibility.

@taylorotwell taylorotwell merged commit 22b6d7c into laravel:5.x Dec 14, 2022
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.

2 participants