The queue worker is required for host notifications, mail delivery and background work. Production deployments must run a queue worker continuously.
VisitorPortal uses Laravel's database queue by default:
QUEUE_CONNECTION=database
DB_QUEUE_RETRY_AFTER=180The queue tables are created by the normal migrations. Jobs are stored in jobs; failed jobs are stored in failed_jobs.
Recommended worker command:
php artisan queue:work --sleep=3 --tries=3 --timeout=120 --max-time=3600 --max-jobs=1000 --memory=128DB_QUEUE_RETRY_AFTER must be greater than --timeout. The shipped Docker default is 180, which is greater than the 120 second worker timeout.
Docker Compose uses the queue service for this command in demo and production.
Check failed jobs:
php artisan queue:failedCheck queue health:
php artisan visitorportal:health queueDemo logs:
docker compose --env-file .env.demo -f docker-compose.demo.yml logs -f queueProduction logs:
docker compose -f docker-compose.prod.yml logs -f queueDevelopment logs:
docker compose logs -f queueRestart workers after deployments so they load new code:
php artisan queue:restart- Notifications or e-mails are delayed: confirm the
queueservice is running and healthy. - Jobs fail repeatedly: inspect
php artisan queue:failed, application logs and SMTP settings. - Jobs are retried too early: ensure
DB_QUEUE_RETRY_AFTERis greater than the worker--timeout. - Deployment completed but old behavior remains: restart the queue worker with
php artisan queue:restartor restart the container.
Reference: Laravel 12 Queues.