Over time, while processing your Laravel Jobs, some references will pile up in the server memory that won't be detected by PHP's garbage collector and will cause the server to crash at some point.

Once the limit is reached, the worker process will exit and your process manager will start a fresh instance. If you happen to know there's a certain job that may require a lot of memory allocation and you want to ensure the worker restarts after finishing such job, you may add this to the end of the handle() method: If you're using redis to store your queued jobs, you should know that redis is an in-memory store.

You can do that by starting more workers to process jobs in parallel.

If you want to learn more about Laravel's queue system, make sure to check Laravel Queues in Action!
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