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..
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).
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)
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.
41 Posts
php-cgi.exe hanging webserver - CPU between 0 (idle) to 20% usage..
Apr 21, 2013 06:10 PM|angrywarrior|LINK
Hi,
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!
4342 Posts
Re: php-cgi.exe hanging webserver - CPU between 0 (idle) to 20% usage..
Apr 22, 2013 10:46 PM|Pengzhen Song - MSFT|LINK
Hi,
I think you should try using fastcgi
http://www.iis.net/learn/application-frameworks/install-and-configure-php-applications-on-iis/using-fastcgi-to-host-php-applications-on-iis-60
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
http://mvolo.com/iis-fastcgi-and-php-what-you-absolutely-need-to-know-to-host-php-applications-on-iis-6-and-iis-7/
Hope it can help you
Thanks!
41 Posts
Re: php-cgi.exe hanging webserver - CPU between 0 (idle) to 20% usage..
Apr 23, 2013 03:46 AM|angrywarrior|LINK
Thank you for your suggestions!!
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)
Thanks!
4 Posts
Re: php-cgi.exe hanging webserver - CPU between 0 (idle) to 20% usage..
Oct 17, 2013 08:38 AM|pl2013|LINK
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.