I have configured a laravel queue to send emails, and it used to work fine sending the emails immediately.
I also used laravel task scheduler and configured the queue:listen to be executed every minute, resulting in the server crashing because cron job was calling the queue:work loop over and over again.... The site crashed. And it was the live site of the client, so the issue is pretty serious.
The hosting company modified my laravel cron job to run every 5 minutes. And since it crashed, all mails now stay in the database and the database queue doesn't work at all. I guess the process is not running at all.
I have these questions:
NOTE: I want it working with the database driver and NOT with redis or sync or something else, so please stay focused on the database driver, thanks.
laravel task scheduler and configured the queue:listen to be executed every minute
This is wrong. You should never call queue:listen
via the cron scheduler, otherwise you'll get unexpected behavior like what occurred to you.
You should configure the queue:listen to run as a daemon process forever. Once the queue worker is running - it will run forever and process jobs as needed. You can use Supervisor to ensure it remains running.