My Horizon was eating 1.2 GB of RAM. Now it's ~280 MB. Same app, same jobs π€―
I gave it the PHP-FPM trick: fork every worker from one template that owns a shared opcache. Now my workers share one compiled copy.
π₯ Individual worker: ~56 MB β ~7.4 MB
π₯ Laravel Cloud 2 GB box: 27β¦
GitHubGitHub - tevkert/queue-prefork: Cut the memory of Laravel queue workers by up to 80 %: queue:work and Horizon workers fork from one template that shares compiled code. Drop-in, no code changes.Cut the memory of Laravel queue workers by up to 80 %: queue:work and Horizon workers fork from one template that shares compiled code. Drop-in, no code changes. - tevkert/queue-prefork