lundi 4 juin 2018

Does running a command in shell using crons consume more server resources than executing a laravel command?

I am executing the queue:work command using a cron every 15 minutes on a shared server currently. Today, when I saw the number of processes running, it was 23 processes. I am afraid I would get an email from my host soon or the server would crash or maybe it won't function properly.

And another server where I have just 1 command running daily morning, the number of processes running was 0.

I wonder whether the direct execution of a command from the cron is taking up more resources and does executing a laravel command using a cron take up less resources ?

It seems to me that every 15 minutes, a new instance of a shell is run and the queue:work command is executed. I am also notified of Invalid argument supplied for foreach() error multiple times a day due to this.

Kindly guide on a proper approach to this. I cannot afford a VPS/Dedicated server as of now. My shared server allows running a cron with a minimum interval of 15 minutes.



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire