3

I'm running a cron job on a direct admin server that runs every minute and every minute the connections/processes almost triples to about 90 from about 30. They die right away and they drop back down to about 30.

https://laravel.com/docs/5.8/scheduling#scheduling-queued-jobs

I'm using the scheduler cron job

* * * * * cd /path-to-your-project && php artisan schedule:run >> /dev/null 2>&1

What would be creating all these connections?

I also have a problem when restarting the queue with php artisan queue:restart. A sleeping process starts that lasts forever, crashing the server eventually so I have to manually kill it.

edit here's a screenshot

Connections

Theory
  • 65
  • 9

1 Answers1

0

I think your job is having error. Try php artisan [your job command]. Check if it is running fine. Besides, don't you have a cron table to record your job status?

vikash singh
  • 1,479
  • 1
  • 19
  • 29
yk.
  • 26
  • 3
  • There's only 2 commands that the scheduler runs and neither of them give an error – Theory Nov 01 '19 at 11:05
  • if you are sure that your cronjob set up correctly. Then there must be an infinite loop, in your cron job, check through the logic again. Clone your project to local, and clone the db data to your local. Test it out. – yk. Nov 01 '19 at 11:59