Please help me get FastCGI working with nginx

mike mike503 at
Mon Aug 4 21:02:06 MSD 2008

On 8/4/08, Stephane Bunel <stephane+nginx at> wrote:

>  In my own experience unix socket is better in terms of speed when nginx and
> PHP are on the same computer. My test was made with httperf and show a
> better rate (req/s) with PHP/FastCGI using unix socket. Why do you recommend
> tcp socket ?

Like I said, various reports in the past. I'm pretty sure just within
the last couple months someone mentioned on here (or maybe it was the
PHP/PHP-FPM list) having some sporadic issues, he was using sockets,
he changed to TCP and had no issues. I also said that for all I know
all the socket issues have been fixed now on modern day stuff. But I
have no reason or care to try them myself.

I am serving up requests pretty much as fast as they can be served now
it seems like. I have a real world load and don't need to benchmark to
see if I can squeeze out an extra 100 requests per second, as that
would require the database to be doing 100 more page loads worth of
work per second too, etc. When I need to scale up or out, I will pick
the appropriate place. Most likely the database will need scaling, not
my php+fastcgi stuff. But I've actually been able to scale my
webserver/php+fastcgi setup down to 3 servers from 4 even without an
issue. I think I have plenty of room to grow still using TCP.

More information about the nginx mailing list