Laravel Queue Worker Memory Footprint is Too Big :/ Laravel Queue Worker Memory Footprint is Too Big :/ laravel laravel

Laravel Queue Worker Memory Footprint is Too Big :/


Might this would help to cut down the memory that is used in your queue.

url : Laravel queues - Resource Considerations

Resource Considerations

Daemon queue workers do not "reboot" the framework before processing each job. Therefore, you should free any heavy resources after each job completes. For example, if you are doing image manipulation with the GD library, you should free the memory with imagedestroy when you are done.


Have you checked your php.ini and turned off any extensions you don't require for your worker & rest of codebase.

You could create a custom php.ini for this worker and supply it via the command line arguments

php -c queue_php.ini artisan queue:work.

Don't forget that the memory footprint you're seeing there is for all of that PHP execution so that includes the JIT Compiler and any extensions loaded and whatever they load.