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

Glimpse streamlines Laravel development by seamlessly deploying GitHub pull requests to preview environments with the help of Laravel Forge. Glimpse streamlines Laravel development by seamlessly deploying GitHub pull requests to preview environments with the help of Laravel Forge.
Fathom Analytics | Fast, simple and privacy-focused website analytics. Fathom Analytics | Fast, simple and privacy-focused website analytics.
Shirts painstakingly handcrafted by under-caffeinated developers. Shirts painstakingly handcrafted by under-caffeinated developers.
Community Partners