I have a PHP script which runs on a cron every 10 minutes - when the script finishes it seems to still remain in the running processes until a restart.
For example if I run
ps aux | grep -i scriptName
I get
root 684 0.2 0.0 383884 23188 ? Ss Feb27 0:07 /usr/bin/php -q /path/to/scriptName
root 846 0.9 0.0 383880 23124 ? Ss Feb27 4:39 /usr/bin/php -q /path/to/scriptName
root 925 0.5 0.0 383868 23136 ? Ss Feb27 1:39 /usr/bin/php -q /path/to/scriptName
root 1524 0.2 0.0 383884 23176 ? Ss Feb27 0:07 /usr/bin/php -q /path/to/scriptName
root 1632 0.6 0.0 383868 23132 ? Ss Feb27 1:45 /usr/bin/php -q /path/to/scriptName
root 1750 0.9 0.0 383880 23116 ? Ss Feb27 4:32 /usr/bin/php -q /path/to/scriptName
root 2172 0.2 0.0 383884 23184 ? Ss Feb27 0:06 /usr/bin/php -q /path/to/scriptName
root 2289 0.5 0.0 383868 23140 ? Ss Feb27 1:33 /usr/bin/php -q /path/to/scriptName
How can I get these to clean up once they have run?
I have other scripts which run on cron which do not seem to do this - this is the only one which does.
At the moment there are 100 of these running and I am worried they are going to cause a resource hit and cause issues or a performance problem.