Today my server came to a grinding halt. After waiting about 2 minutes for remote desktop to log in, I opened task manager (another 2 mins) and saw that there was about 40 instances of php-cgi.exe running. I've googled this and saw that people had the same problem, and recommendations was to switch from FastCGI to ISAPI. But I'm using Apache on Windows and don't want to switch to IIS. Any ideas what is causing this problem? It only started recently and the server is not really loaded.
Had the same problem a few months ago. Tracked it down to a rogue wordpress plugin that was using the notorious psuedo-cron built into wordpress. wp_cron() in 'wp-includes\cron.php'
Deacalion, thanks for the quick reply. I'm not using Wordpress. Do you think it can be some other plugin causing it?
Wouldn't know without looking. Took my a while to figure that one out. This is why it happened with me anyway: User visits site, wordpress fires the psuedo cron The plugin added a cronjob to retrieve an xml feed The xml server was slow, so the cronjob took ages These cronjobs built up until php instances were everywhere Maybe there is something that takes quite a while to finish executing. They will eventually pile up until they crash. A messy database query perhaps?
I understand your scenario, and we sometimes have long-running operations which generate PDF files from database information. But I mean, the processes are supposed to terminate at some point with a timeout or something, even if the query hangs, or will it just sit there forever? And why does these processes continue to run even when I stop Apache?