How to Stop Crashing / Hanging of php-cgi / spawn-fcgi with nginx / lighttpd
One of the frequently complained problems while using nginx or lighttpd, two popular and rapidly growing web servers which are faster and lighter alternatives to big daddy Apache web server, with php (through fastcgi interface) is that the pool of php-cgi which ultimately serves the php pages seems to hang frequently and without any apparent reasons. This is also the reason you will see the most common error on nginx website is the dreaded 503 - Gateway Time out. These errors seems to happen without much pattern and it took us some time to find the cause and fix it. In this article we will not only show you how to get rid of this error but also to enable pre-defined QoS with different PHP based services so that even if one pool of fast-cgi servers go down, the others continue to operate unaffected. In short if you have a popular website or blog running on nginx or lighttpd, then you should read it. Please mention it in your favorite social bookmarking service and digg it so others can see it too.

