how to prevent laravel queue job, schdule and cron job from killing the server
My problem is more of fallback I think, now I have a two queue job in my laravel job queue am using database Driver. The first command create credentials for my user from another site base on API calls, and the second is to email for verification and 2FA. Also, there is another command that update change my unit conversion rate.
protected function schedule(Schedule $schedule){
$schedule->command('update:conversionRate')->everyFiveMinutes();
$schedule->command('queue:work')->everyMinute();
}
queue job are added to my queue using dispach command and shouldQueue interface the API call uses the dispach function while the email uses sholudQueue. Now it work because i can see the jobs in my database. But when the server cron job runs it will crash. and my Log file shows that the my MYSQL users has reach it maxium connection limit. hence no nobody can asess the database using that user account.
So my question how to do I setup the cron job and queue:work
so that it does not crash the server. Please the work is live already and I need urgent help please.
from Laravel Questions and Answers https://laravelquestions.com/php/how-to-prevent-laravel-queue-job-schdule-and-cron-job-from-killing-the-server/
via Lzo Media
No comments:
Post a Comment