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

LionHeartBlue's avatar

Laravel Forge, Queues, Keep restarting

I have a Laravel Application set up, with a number of jobs that are queued. So In forge, I set up the Queue's but none of the workers seem to stay alive for more than 20 seconds.

I'm not sure if this is normal behaviour, but if I view the status of them with the forge Check Worker Status button, I can see a number of them starting up, others with an uptime of only 12 seconds. If I close and open it again, then others have dropped and are Starting up. They never seem to stay up long enough to process anything in my Queue.

Is this normal? What could be killing my workers? I have tried running them with the daemon option ticked and without but to no avail.

So if I look at the server logs, this is what they show:

supervisord 2020-01-30 10:57:45,709 INFO exited: worker-271276_16 (exit status 0; expected)
supervisord 2020-01-30 10:57:45,821 INFO spawned: 'worker-271276_16' with pid 15287
supervisord 2020-01-30 10:57:45,828 INFO exited: worker-271276_04 (exit status 0; expected)
supervisord 2020-01-30 10:57:46,830 INFO spawned: 'worker-271276_04' with pid 15303
supervisord 2020-01-30 10:57:46,831 INFO success: worker-271276_16 entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
supervisord 2020-01-30 10:57:47,832 INFO success: worker-271276_04 entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
supervisord 2020-01-30 10:57:48,253 INFO exited: worker-271276_14 (exit status 0; expected)

Is this normal? Why would they exit and restart?

0 likes
8 replies
themsaid's avatar

Which version of Laravel are you running? Can you please share the worker configuration on Forge?

LionHeartBlue's avatar

Hi, we are using Laravel 5.6 currently.

And this is the forge worker configuration:

Queue:  low, normal, normal_plus, high
Timeout:  3500
Processes: 20
Rest Seconds When empty:  60
Delay: 60
Maximum Retries: 3
themsaid's avatar
themsaid
Best Answer
Level 4

What if you lower the number of processes? Could be that your server is running out of resources.

LionHeartBlue's avatar

Well, don't I feel stupid. I was 100% sure I had used 20 processes on this server before, but I guess not, or maybe someone added something to it that is consuming resources, either way, what you said makes sense.

I reduced it to 10 and it is now fine. Thanks

Please or to participate in this conversation.