WordPress for IIS 7 php-cgi hogging CPU

Running WordPress on IIS 7 (Windows Server 2008) with WP-SuperCache according to the IIS.net Guide.

Works great, but recently we changed permissions on some folders and the administrator password, and we get huge spikes in the use of our processor as a result of the PHP-cgi.exe processes.

cpu usage

php-cgi.exe processes

This leads me to believe that this is not caching, but the pages themselves have “Cached with WP-SuperCache” comments at the bottom, and caching seems to work correctly.

What else could be the problem here?

+7
source share
2 answers

I think that maybe I found a solution, or at least a working round of this problem, at least it seems to work reliably for me.

Try setting the Max. instances under IIS Server -> FastCGI Settings to 1.

It seemed to me that only certain requests called the php-cgi.exe process, so that it became an outcast and started the processor, usually when updating a message. When reading other posts on this issue, one of them mentioned the Max Instances setting and set the default value to 0 or automatically. I wondered if this could have a good effect if everything is not as it should be. I suppose (but this is not really my area of ​​expertise) if a particular request triggers a blocking process, so FastCGI just creates another, leaving the first in its place. Somehow it seems that only one instance allows PHP to move from locking, and the processor remains under control.

For servers with a high level of requests, setting FastCGI to just one instance may not be ideal, but, of course, it exceeds the delays that I received earlier. Used in combination with WP-SuperCache and WinCache, now it seems that it’s nice to compress now.

+8
source

Looking at this task, mgr looks as if its cache is missing on every request. Plus to this article dates from 2008, it is so hard to say whether all the written directions will work. Perhaps something has changed with WP-SuperCache.

I would recommend using W3 Total Cache. I did extensive testing with it on Windows Server 2008 and IIS 7, and it works great. It is also compatible with the WinCache extension for PHP and uses it. Has some other great features if you are interested, minimization, CDN support, etc. This is a really great performance plugin for WordPress. You can get the plugin here, http://wordpress.org/extend/plugins/w3-total-cache/

some other things to check ...

What is the size of the application pool? (# processes?) Make sure you are using PHP 5.3. Make sure you are using WinCache. Remember to set MaxInstanceRequests to something less than PHP_FCGI_MAX_REQUESTS. Definitely don't let PHP handle re-application pooling. The default request is 10K. If you see these results during a load test, this may be the reason. Increase MaxInstanceRequests and save it one less than PHP_FCGI_MAX_REQUESTS.

Hope this helps.

+1
source

All Articles