nginx, from connected to first byte.

Francis Daly francis at
Wed Mar 16 02:13:47 MSK 2011

On Tue, Mar 15, 2011 at 12:05:52AM -0400, digginchina wrote:

Hi there,

> thanks a lot for the reply, i disable debug when compile the nginx, need i re-compile? i don't know the exact meaning of "debug log", whether it's a general nginx log or another log?

Debug log:

Must be enabled at compile time.

> and one more question, how to check the status of nginx-fastcgi connection and the fastcgi-application interaction?

nginx-fastcgi: nginx is the client, your fastcgi server is the
server. Debug log shows the nginx side; tcpdump or something similar
can show the traffic between the two; and your server may have a "debug"
mode to show its idea of the interaction.

fastcgi-application: your fastcgi server and your application. Maybe
extra sleeps and prints can show what is going on?

> btw, i use unix file pid to connect fastcgi, could you please tell me whether this method or network port method is better?

If the fastcgi server is on a different machine, the network port method
is better because it works.

If nginx and fastcgi are on the same machine, the connection method
shouldn't matter (much). Unix sockets should be better from an
access-control view. But there are suggestions on this list recently
that the combination of "sendfile on" and unix sockets on at least one
OS has problems with largish uploads.

The two options seem close enough to me, that if your testing doesn't
show a good reason to pick one over the other, then choose either and
don't worry about it.

Good luck with it,

Francis Daly        francis at

More information about the nginx mailing list