I have a cronjob that runs php5 wp-cron.php every minute to update my website.
However something happened and i had 30+ instance of it (31 is marked on this one dump of
ps aux). It ate up my ram, caused additional instance to terminate do to lack of memory and caused me not to be able to ssh into the box.
I can't understand why instances were living >30mins, one usually takes a few seconds. The day it happened i had no jobs planned (although maybe wp cache usesd it? but i never had a problem before)
What can i do to prevent a cronjob from spamming and destroying my memory? Is there a way i can say do not start if an instance is alive? and if an instance is alive for more then 5mins kill it?
Is there a way i can protect myself from something similar from happening?