Stressing nginx

Maxim Dounin mdounin at mdounin.ru
Tue Mar 16 15:55:49 MSK 2010


Hello!

On Tue, Mar 16, 2010 at 08:38:41AM -0400, stormdust wrote:

> Anyone around to peek on the logs to try and point me to a good direction?
> 
> It seems the errors occurred when the concurrency happens between requests to the mono process:
> 
> (mono log)
> [2010-03-15 11:27:10Z] Debug   Accepting an incoming connection.
> [2010-03-15 11:27:10Z] Debug   Accepting an incoming connection.
> [2010-03-15 11:27:10Z] Debug   Record received. (Type: BeginRequest, ID: 1, Length: 8)
> [2010-03-15 11:27:10Z] Debug   Accepting an incoming connection.
> [2010-03-15 11:27:10Z] Debug   Record received. (Type: Params, ID: 1, Length: 529)
> [2010-03-15 11:27:10Z] Debug   Record received. (Type: BeginRequest, ID: 1, Length: 8)
> [2010-03-15 11:27:10Z] Debug   Record received. (Type: Params, ID: 1, Length: 0)
> [2010-03-15 11:27:10Z] Debug   Record sent. (Type: EndRequest, ID: 1, Length: 8)
> 
> He signals the End Request to other requests it seems. I 
> continue to pursue if this is a nginx problem or a mono problem 
> :(

nginx sends FCGI_BEGIN_REQUEST and FCGI_PARAMS records in single 
chunk, it is impossible that they may be intermixed during sending to 
mono.

Most likely the problem is that mono assumes that request id 
must be unique across multiple transport connections.  This is 
incorrect assumption per FastCGI specs, see here:

http://www.fastcgi.com/devkit/doc/fcgi-spec.html#S3.3

% The Web server re-uses FastCGI request IDs; the application keeps 
% track of the current state of each request ID on a given transport 
% connection. 

Maxim Dounin



More information about the nginx mailing list