Laravel Queue Jobs Were Running Successfully but Emails Were Never Sent
What happened?
I had a Laravel application where queued emails appeared to be dispatched successfully, but users never received them.
The application was running normally, and the jobs were being added to the queue without any visible errors. The confusing part was that everything worked when I used
QUEUE_CONNECTION=sync.
After switching to Redis for production, the emails stopped arriving.
Environment
Error Message
There was no visible error in the Laravel application. The jobs simply remained in the Redis queue.
What was actually wrong?
The Laravel queue worker was not running on the production server.
The application was correctly pushing jobs into Redis, but nothing was processing them.
The Fix
I started the Laravel queue worker and configured Supervisor to keep it running:
php artisan queue:work redis
Then I added the worker to Supervisor so it would automatically restart if the process stopped.
After restarting Supervisor, the queued emails were processed normally.
What I Learned
A successful job dispatch does not mean the job was actually processed.
When using Redis, RabbitMQ, or another queue driver in production, always verify that the queue worker is running and being supervised.
Comments (0)
Please log in to leave a comment.
No comments yet. Be the first to share your thoughts!