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

blacklotus's avatar

Too many cron:run processes?

My DO droplet is having some memory issues recently so I decided to look into the processes. I noticed that I have quite a few of these non-site specific cron processes that are running, almost too many of them.

forge    24862  0.0  0.0   4628   856 ?        S    Nov24   0:00 sh -c '/usr/bin/php7.3' 'artisan' cron:run > '/dev/null' 2>&1
forge    24863  0.0  2.2 476688 46664 ?        S    Nov24   0:04 /usr/bin/php7.3 artisan cron:run

As of writing, I have about 41 of these

forge@s1:~$ ps aux | grep cron:run | wc -l
41

Individually they don't take up a lot of memory, just 1 or 2%, but at 41 processes they add up.

Questions

  1. Is this number normal or is there too many of them?
  2. Is it safe to kill all of them?
  3. Any reason why it seems to be acting up like this?
  4. What are these for anyway since they are not attached to any specific sites?
0 likes
2 replies
bobbybouwmann's avatar

cron:run is not a default command in Laravel. If you want to run the cronjobs defined in your app/Console/Kernel.php you would run php artisan schedule:run >> /dev/null 2>&1.

Documentation: https://laravel.com/docs/6.x/scheduling#scheduling-artisan-commands

So far I see two incosistensies. First of all you're using a different command. What is this command doing? Maybe it runs something on the background as well?

Secondly, you use one > in your output. Normally this shouldn't be an issue, since they both right to /dev/null, but it's recommended to use the double variant

Source: https://unix.stackexchange.com/questions/171025/what-does-do-vs

blacklotus's avatar

Thanks. Took me a while to realize that cron:run is actually a custom command in one of the projects hosted, and not the actual Laravel scheduler command.

So I killed all the processes and now the server is back to normal.

Please or to participate in this conversation.