Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

realtebo's avatar

How to monitor queue:worker running in supervisor?

I have a LOT of queue workers . A lot, something like 30.

Sometimes, one time in a month or less, a queue worker go definitively down because failing too fast for a combination of reasons.

How can I (from linux and/or from Laravel/PHP) verify if all queue:workers are running?

0 likes
5 replies
Snapey's avatar

supervisor should be doing that for you?

are you limiting the amount of time a worker can run for?

rodrigo.pedra's avatar

In Linux shell you can use pgrep and wc to count how many processes you have running that match some expression:

$ pgrep -f 'artisan queue:work' | wc -l
2

You can then use this to compare with your expected processes count, wither on a Laravel scheduled task, or a shell script running on a timely basis.

1 like
realtebo's avatar

Thanks to all for replies.

So we canno monitor supervisor itself... ?

realtebo's avatar
realtebo
OP
Best Answer
Level 4

@Snapey well.. I mean i want to 'monitor' supervisor because i need to know each process of each group if is running or not.

Anyway, I found a way using XML-RPC api on supervisor and a few php packages (official) offered by supervisor developers. They allow us to edit configuration file and reload and ask for status, etc..

Probably, I definitevely resolved the problem.

See: https://github.com/supervisorphp/supervisor and https://github.com/supervisorphp/supervisor

Please or to participate in this conversation.