php-cgi.exe hanging webserver - CPU between 0 (idle) to 20% usage.. RRS feed

  • Question

  • User-1182299804 posted


    I have a running 2003 server/iis6 with 4 WordPress sites running - it works great with pretty permalinks and all the bells and whistles as far as the WP installation goes. The server has about 2GB memory/1 single processor - so its not a high end server.

    They only issue is that when the php-cgi.exe spawn to multiple processes like over 10-15 (maybe its 15-20 somewhat) it starts hanging even though the server load is very low. The cpu is between idle-ling to maybe 15-20 %.

    I have tried to test with different values on the "maxinstances=" from auto dynamic throttle (0) to higher values - but it does not seem to do much difference. Best effect has been when I have set a lower value like 6-8. The server also uses a lot of page file (4-6 GB) instead of utilize the internal memory, even though there is at least 1 gigabyte or more memory free..

    I'm stuck with iis6 for now until, so I cannot upgrade..

    Any ideas what can be done to fix this?

    thanx! Laughing

    Sunday, April 21, 2013 6:10 PM

All replies

  • User1183424175 posted


    I think you should try using fastcgi


    FastCGI on IIS allows reuse of an existing pool of non-exiting processes, so instead of one request starting, processing, and exiting a new process, each request is distributed to a pool of worker processes running (in this case) PHP-CGI.

    ANd also, as an alternative to IIS with PHP which is purely CGI based, you can use a WAMP package that uses PHP as an Apache module (thread based).

    Source from http://serverfault.com/questions/323127/multiple-php-cgi-exe-processes-on-iis

    ANd please refer here


    Hope it can help you

    Monday, April 22, 2013 10:46 PM
  • User-1182299804 posted

    Thank you for your suggestions!! Laughing

    I think you should try using fastcgi

    My bad though - I'm sorry that I forgot and did not include this in the thread but the server is already using fastcgi. I have used the Microsoft web platform installer to install php (also WordPress) php.

    I'm trying to play around with the recycling of threads right now in IIS and in fastcgi.ini file to find a solution, since the cgi process hangs. So my idea is that if you get it to shutdown and recycle the processes the web server should not be handing anymore. 

    Any feedback/ideas to my approach? (like is it the right way to handle the issue? - what could be the best settings) 


    Tuesday, April 23, 2013 3:46 AM
  • User-240342396 posted

    So my idea is that if you get it to shutdown and recycle the processes the web server should not be handing anymore. 

    Did you have any luck? I have a similar problem, occasionaly php process number go through the roof, normamlyy about 12 running but goes to 200 once in a while which makes the server hang, cpu and ram look fine in Task manager though.

    I was thinking about reducing my Activty Timeout from 600 down to something lower like 100-300, or changing my MaxInstances from 0 to 40.

    Thursday, October 17, 2013 8:38 AM