If you're running your queue workers on a server with limited resources, or a server that's also used to serve HTTP requests and do other tasks, it's important to ration the resource used by those workers. You can use the --max-jobs and --max-time options on the php artisan queue:work command to limit the number of jobs the worker may process or the time it should stay up. Once the limit is reached, the worker process will exit and your process manager will start a fresh instance.

The payload of each of your jobs is stored in the server memory until the job is processed and deleted.

To limit the memory used by the queue store, make sure the jobs are processed as fast as possible.
Newsletter

Get the latest Laravel/PHP jobs, events and curated articles straight to your inbox, once a week

Fathom Analytics | Fast, simple and privacy-focused website analytics. Fathom Analytics | Fast, simple and privacy-focused website analytics.
Achieve superior email deliverability with ToastMail! Our AI-driven tool warms up inboxes, monitors reputation, and ensures emails reach their intended destination. Sign up today for a spam-free future. Achieve superior email deliverability with ToastMail! Our AI-driven tool warms up inboxes, monitors reputation, and ensures emails reach their intended destination. Sign up today for a spam-free future.
Community Partners