[FASTCGI] Socket error (EAGAIN) at high load

Dean Banks connexity2 at gmail.com
Mon Jul 23 16:55:02 EDT 2012

Hi all,

I'm running an FCGI 2.4.1-based  C application over a Unix domain socket 
behind nginx on Linux 2.6.32.  At periods of high load, I get a lot of 
EAGAIN errors from nginx, implying that my app is not draining the 
receive buffer fast enough.

I have a high number of FDs configured and socket buffers are

SO_RCVBUF = 256960
SO_SNDBUF = 256960

It appears that reducing READABLE_UNIX_FD_DROP_DEAD_TIMEVAL from the 
default of 2.0 seconds may be a reasonable next step to reduce the 
volume of EAGAIN errors under load, but other than a "conservative" 
value of 2.0 and a "doesn't work" value of 0.0, I'm having a hard time 
picking a starting point to iterate around.

As an aside, the source mentions that the timeout is required to work 
around a kernel bug,  though without additional information it's not 
clear if the bug has been addressed.  Is the timeout still required?



More information about the FastCGI-developers mailing list