Laravel Scheduled Jobs consuming all server resources

Posted 2 months ago by longestdrive

Hi

I've recently upgraded a site to Laravel 5.5. The site (like others I have) use a cron job on the deployed server to run the scheduled commands. The CRON runs every minute.

One of the commands is to run the queue jobs and I use this command:

$schedule->command('queue:work')->everyFiveMinutes();

I've had no problems up until now. But now it gradually consumes all the server resources to the point where other sites I run on the vps start falling down and affecting mysql connections across all sites.

I regularly get failed mysql connections.

On checking the server process the queue:work consumes alot of resources.

Is there something I'm doing wrong or a better way to run the queue jobs? Pulling my hair out on this

Please sign in or create an account to participate in this conversation.

Reply to

Use Markdown with GitHub-flavored code blocks.