DEV Community

Antonios Thanasis
Antonios Thanasis

Posted on • Edited on

Queue Runs in Sync Mode Despite QUEUE_CONNECTION=database in .env

Queue Runs in Sync Mode Despite QUEUE_CONNECTION=database in .env

Sometimes after switching your queue connection from sync to database, jobs still run synchronously — or nothing works as expected.

The culprit is usually Laravel's configuration cache.

Even if your .env is correct:

QUEUE_CONNECTION=database
Enter fullscreen mode Exit fullscreen mode

Laravel may still be reading a stale cached config.


✅ Fix

Run these two commands:

php artisan config:clear
php artisan queue:restart
Enter fullscreen mode Exit fullscreen mode
  • config:clear — removes the cached configuration so Laravel reads your .env fresh
  • queue:restart — signals running queue workers to restart and pick up the new config

After that, your queue should correctly use the database driver. 🚀


Happy coding!

Top comments (0)