Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

NyiNyiLwin's avatar

Memory Usage Spike After Job Completion Despite Optimizations

Every time a job finishes, the memory usage increases by 10 to 15 times. I've already optimized the queries and fixed any memory leaks I could find. I also have a cron job set up to restart the queue regularly, but the issue still persists.

Image

0 likes
5 replies
Glukinho's avatar

What does your job do?

Does it happen if you launch the job or actions inside it via artisan command?

NyiNyiLwin's avatar

@Glukinho no, it doesn’t happen in either case.

most of my jobs are long-running jobs, syncing product data with channels

Glukinho's avatar

Is it queue:work or queue:listen?

As a workaround, you can turn off your supervisor services and schedule every minute: php artisan queue: work --once

Please or to participate in this conversation.