This is a submission for DEV's Summer Bug Smash: Clear the Lineup powered by Sentry.
The Problem
I had a Laravel application connected to Make.com.
Make.com was sending requests every 30 minutes, and Laravel was processing them through a queue.
Everything worked β until the server restarted.
My first approach was simple:
nohup php artisan queue:work redis &
The worker ran fine, but after a server restart, it was gone.
π΄ 1. Why did the queue stop?
Server restart β nohup worker dies β queue stops processing

nohup keeps a process running in the background, but it doesn't give me a reliable process supervisor.
So I needed the worker to automatically come back.
The First Fix: cPanel Cron + flock
I moved the queue worker startup to a cPanel Cron job.
I also used flock so that Cron wouldn't create multiple queue workers.
/usr/bin/flock -n storage/framework/queue-worker.lock \
php artisan queue:work redis \
--queue=default --sleep=3 --tries=3 \
--timeout=120 --max-time=120
Now:
- Server restarts β Cron starts the worker again
- Worker already running β
flockprevents another worker - Worker processes jobs β no manual restart
That solved the queue-worker problem.
But then I found another problem.
The Second Problem: Make.com Started Timing Out
The queue was running.
Redis was running.
But Make.com started returning 504 timeout errors.
I initially thought the queue was still the problem.
It wasn't.
π 2. The Hidden Bottleneck
My server had:
65 GB RAM
20 CPU cores
But PHP-FPM was configured with:
pm.max_children = 5
pm.max_requests = 20
pm.process_idle_timeout = 10
That meant only 5 PHP requests could be handled concurrently by that PHP-FPM pool.
So the flow became:
Make.com β Laravel β PHP-FPM β requests wait β timeout
The server had plenty of resources. PHP-FPM simply wasn't configured to use them effectively for the workload.
The Final Fix
I tuned PHP-FPM for the server's actual capacity and kept the queue worker managed by Cron + flock.
π’ 3. The Final Architecture
cPanel Cron β flock β Laravel Queue Worker β Redis
and
Make.com β Laravel API β PHP-FPM
- β Queue worker automatically starts after restart
- β
flockprevents duplicate workers - β PHP-FPM can handle more concurrent requests
- β Make.com requests stop timing out
- β No more manually restarting everything
What I Learned
The biggest lesson wasn't about Laravel queues.
It was about looking at the whole request path.
I was initially focused on:
"Why does my queue keep stopping?"
The better question was:
"Where exactly is my system becoming the bottleneck?"
A queue problem isn't always a queue problem.
Sometimes the real bottleneck is before the queue.
Final Architecture
Make.com
β
βΌ
Laravel API
β
βΌ
PHP-FPM
(enough workers)
β
βΌ
Redis
β
βΌ
Queue Worker
β
βΌ
Processed Jobs
cPanel Cron + flock
β
βββ keeps worker reliable
The result was a more reliable Laravel + Redis + Make.com workflow without manually restarting everything after a server restart.


Top comments (0)