-
Notifications
You must be signed in to change notification settings - Fork 645
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
horizon:purge kills processes of another Laravel application on the same server #769
Comments
So you have multiple applications running horizon on the same server, and each application is using a different redis connection? is that what you have? |
Yes, they all use different connections, so there's no problems with conflicts between them. Only the purge command seems incompatible with multiple applications on the same server. |
It's indeed true that it'll stop all horizon processes, even from other apps. But given that those processes will automatically restart by your daemons that isn't an issue. We'll add a note about this in the docs. Thanks for reporting. |
Why has this been closed? Has anything been done to resolve it yet? It's clear that this is not what The documentation says that "you should configure a process monitor to monitor the php artisan horizon command and restart it if it quits unexpectedly". Not that "you have to configure a process monitor because Horizon will kill its own processes from time to time". If this won't be fixed then |
@rafalglowacz feel free to open a PR with a proposed solution to get around this limitation. Purge is going to kill rogue processes and some normal processes, if you find a way to change this behaviour and make it identify only rogue processes then it's a good enhancement. |
Hi, Have you already seen some orphans processes with Horizon @themsaid ? |
Description:
We have Horizon running for a few different Laravel installations on the same server. A while ago we noticed some orphaned workers, so we've added
horizon:purge
to scheduled tasks. But as it turns out this kills all processes except for the ones monitored by the current instance. Including all masters, supervisors and workers running for the other Laravel apps.Apparently this is caused by the ProcessInspector class. In its
current
method it gathers all running processes that simply have "horizon" in their name (and don't have "purge" in the name).I'll fix that locally by filtering the processes by supervisor name, as our supervisors use the application name to differentiate themselves. Not sure what can be done in Horizon as a whole, I'll try to look into that later.
The text was updated successfully, but these errors were encountered: