Stressing nginx

Hi everybody.

I have been testing nginx with mono to see if we can go this pass in
development on the company.

I have made 4 simple pages:
-Two static pages (html, one with 1k and another with 25k)
-Two dinamic pages (one just compile on mono, the second compile in mono
and go to SQL database, both made cache on mono)

More relevant data: Runing Suse 11.2 with nginx 0.84 and fastcgi with
mono 2.6.

Result
http://img412.imageshack.us/img412/3068/graph4x.png

I had some problems ad-hoc during the test that i didn’t manage to
resolve with the configurations in ngnix. I really need some help to try
identify the causes of the problems. Because the problems are random it
seems, and not being caused by stressing the server.

I identify 3 major problems with nginx:

  • upstream sent unexpected FastCGI record: 3
  • upstream sent unsupported FastCGI protocol version: 116
  • upstream sent unsupported FastCGI protocol version: 60 while reading
    upstream

One maybe be causing by mono (check mono log).

Nginx log:
2010/03/05 18:27:45 5249#0: *16076 upstream sent unexpected FastCGI
record: 3 while reading response header from upstream, client:
127.0.0.1, server: localhost, r$
2010/03/05 18:27:45 5249#0: *16102 upstream sent unsupported FastCGI
protocol version: 116 while reading upstream, client: 127.0.0.1, server:
localhost, request: $
2010/03/05 18:27:45 5249#0: *16148 FastCGI sent in stderr: “Failed to
parse parameter data” while reading response header from upstream,
client: 127.0.0.1, server$
2010/03/05 18:27:45 5249#0: *16148 upstream sent unexpected FastCGI
record: 3 while reading response header from upstream, client:
127.0.0.1, server: localhost, r$
2010/03/05 18:27:45 5249#0: *16169 upstream sent unexpected FastCGI
record: 3 while reading response header from upstream, client:
127.0.0.1, server: localhost, r$
2010/03/05 18:27:45 5249#0: *16167 FastCGI sent in stderr: “Failed to
parse parameter data” while reading response header from upstream,
client: 127.0.0.1, server$
2010/03/05 18:27:45 5249#0: *16167 upstream sent unexpected FastCGI
record: 3 while reading response header from upstream, client:
127.0.0.1, server: localhost, r$
2010/03/05 18:27:45 5249#0: *16186 upstream sent unexpected FastCGI
record: 3 while reading response header from upstream, client:
127.0.0.1, server: localhost, r$
2010/03/05 18:27:47 5249#0: *16616 FastCGI sent in stderr: “Failed to
parse parameter data” while reading response header from upstream,
client: 127.0.0.1, server$
2010/03/05 18:27:47 5249#0: *16616 upstream sent unexpected FastCGI
record: 3 while reading response header from upstream, client:
127.0.0.1, server: localhost, r$
2010/03/05 18:27:48 5249#0: *16895 upstream sent unexpected FastCGI
record: 3 while reading response header from upstream, client:
127.0.0.1, server: localhost, r$
2010/03/05 18:27:49 5249#0: *17170 FastCGI sent in stderr: “Failed to
parse parameter data” while reading response header from upstream,
client: 127.0.0.1, server$
2010/03/05 18:27:49 5249#0: *17170 upstream sent unexpected FastCGI
record: 3 while reading response header from upstream, client:
127.0.0.1, server: localhost, r$
2010/03/05 18:27:49 5249#0: *17206 upstream sent unexpected FastCGI
record: 3 while reading response header from upstream, client:
127.0.0.1, server: localhost, r$
2010/03/05 18:27:49 5249#0: *17199 upstream sent unexpected FastCGI
record: 3 while reading response header from upstream, client:
127.0.0.1, server: localhost, r$
2010/03/05 18:27:50 5249#0: *17403 upstream sent unexpected FastCGI
record: 3 while reading response header from upstream, client:
127.0.0.1, server: localhost, r$
2010/03/05 18:27:50 5249#0: *17402 FastCGI sent in stderr: “Failed to
parse parameter data” while reading response header from upstream,
client: 127.0.0.1, server$
2010/03/05 18:27:50 5249#0: *17402 upstream sent unexpected FastCGI
record: 3 while reading response header from upstream, client:
127.0.0.1, server: localhost, r$
2010/03/05 18:27:50 5249#0: *17044 recv() failed (104: Connection reset
by peer) while reading response header from upstream, client: 127.0.0.1,
server: localhost$
2010/03/05 18:27:50 5249#0: *16989 recv() failed (104: Connection reset
by peer) while reading response header from upstream, client: 127.0.0.1,
server: localhost$
2010/03/05 18:27:50 5249#0: *17037 recv() failed (104: Connection reset
by peer) while reading response header from upstream, client: 127.0.0.1,
server: localhost$
2010/03/05 18:27:52 5249#0: *18344 upstream sent unexpected FastCGI
record: 3 while reading response header from upstream, client:
127.0.0.1, server: localhost, r$
2010/03/05 18:27:52 5249#0: *18343 FastCGI sent in stderr: “Failed to
parse parameter data” while reading response header from upstream,
client: 127.0.0.1, server$
2010/03/05 18:27:52 5249#0: *18343 upstream sent unexpected FastCGI
record: 3 while reading response header from upstream, client:
127.0.0.1, server: localhost, r$
2010/03/05 18:27:53 5249#0: *18631 upstream sent unexpected FastCGI
record: 3 while reading response header from upstream, client:
127.0.0.1, server: localhost, r$
2010/03/05 18:27:54 5249#0: *18728 FastCGI sent in stderr: “Failed to
parse parameter data” while reading response header from upstream,
client: 127.0.0.1, server$
2010/03/05 18:27:54 5249#0: *18728 upstream sent unexpected FastCGI
record: 3 while reading response header from upstream, client:
127.0.0.1, server: localhost, r$
2010/03/05 18:27:54 5249#0: *18841 upstream sent unexpected FastCGI
record: 3 while reading response header from upstream, client:
127.0.0.1, server: localhost, r$
2010/03/05 18:27:54 5249#0: *18844 upstream sent unsupported FastCGI
protocol version: 60 while reading upstream, client: 127.0.0.1, server:
localhost, request: "$
2010/03/05 18:27:54 5249#0: *18830 upstream sent unexpected FastCGI
record: 3 while reading response header from upstream, client:
127.0.0.1, server: localhost, r$
2010/03/05 18:27:56 5249#0: *19307 upstream sent unsupported FastCGI
protocol version: 116 while reading upstream, client: 127.0.0.1, server:
localhost, request: $
2010/03/05 18:27:56 5249#0: *19621 upstream sent unexpected FastCGI
record: 3 while reading response header from upstream, client:
127.0.0.1, server: localhost, r$
2010/03/05 18:27:57 5249#0: *19659 upstream sent unexpected FastCGI
record: 3 while reading response header from upstream, client:
127.0.0.1, server: localhost, r$
2010/03/05 18:27:57 5249#0: *19661 upstream sent unsupported FastCGI
protocol version: 105 while reading upstream, client: 127.0.0.1, server:
localhost, request: $
2010/03/05 18:27:57 5249#0: *19478 recv() failed (104: Connection reset
by peer) while reading response header from upstream, client: 127.0.0.1,
server: localhost$
2010/03/05 18:27:57 5249#0: *19779 upstream sent unexpected FastCGI
record: 3 while reading response header from upstream, client:
127.0.0.1, server: localhost, r$
2010/03/05 18:27:57 5249#0: *19932 FastCGI sent in stderr: “Failed to
parse parameter data” while reading response header from upstream,
client: 127.0.0.1, server$
2010/03/05 18:27:57 5249#0: *19932 upstream sent unexpected FastCGI
record: 3 while reading response header from upstream, client:
127.0.0.1, server: localhost, r$
2010/03/05 18:27:59 5249#0: *20198 recv() failed (104: Connection reset
by peer) while reading response header from upstream, client: 127.0.0.1,
server: localhost$
2010/03/05 18:27:59 5249#0: *20460 FastCGI sent in stderr: “Failed to
parse parameter data” while reading response header from upstream,
client: 127.0.0.1, server$
2010/03/05 18:27:59 5249#0: *20460 recv() failed (104: Connection reset
by peer) while reading response header from upstream, client: 127.0.0.1,
server: localhost$
2010/03/05 18:27:59 5249#0: *20474 FastCGI sent in stderr: “Failed to
parse parameter data” while reading response header from upstream,
client: 127.0.0.1, server$
2010/03/05 18:27:59 5249#0: *20474 upstream sent unexpected FastCGI
record: 3 while reading response header from upstream, client:
127.0.0.1, server: localhost, r$
2010/03/05 18:28:01 5249#0: *21050 upstream sent unsupported FastCGI
protocol version: 60 while reading upstream, client: 127.0.0.1, server:
localhost, request: "$
2010/03/05 18:28:02 5249#0: *21340 FastCGI sent in stderr: “Failed to
parse parameter data” while reading response header from upstream,
client: 127.0.0.1, server$
2010/03/05 18:28:02 5249#0: *21340 upstream sent unexpected FastCGI
record: 3 while reading response header from upstream, client:
127.0.0.1, server: localhost, r$
2010/03/05 18:28:02 5249#0: *20983 recv() failed (104: Connection reset
by peer) while reading response header from upstream, client: 127.0.0.1,
server: localhost$
2010/03/05 18:28:02 5249#0: *21399 upstream sent unsupported FastCGI
protocol version: 116 while reading upstream, client: 127.0.0.1, server:
localhost, request: $

Mono log:

Parameter name: s
[2010-03-05 18:27:45Z] Error Aborting request 1. Reason follows:
[2010-03-05 18:27:45Z] Error Failed to parse parameter data.
[2010-03-05 18:27:45Z] Error Failed to process connection. Reason:
Argument cannot be null.
Parameter name: s
[2010-03-05 18:27:45Z] Error Aborting request 1. Reason follows:
[2010-03-05 18:27:45Z] Error Failed to parse parameter data.
[2010-03-05 18:27:45Z] Error Failed to process connection. Reason:
Argument cannot be null.
Parameter name: s
[2010-03-05 18:27:47Z] Error Aborting request 1. Reason follows:
[2010-03-05 18:27:47Z] Error Failed to parse parameter data.
[2010-03-05 18:27:47Z] Error Failed to process connection. Reason:
Argument cannot be null.
Parameter name: s
[2010-03-05 18:27:48Z] Error Failed to process connection. Reason: 8
bytes expected.
Parameter name: record
[2010-03-05 18:27:48Z] Error Failed to process connection. Reason: 8
bytes expected.
Parameter name: record
[2010-03-05 18:27:48Z] Error Failed to process connection. Reason: 8
bytes expected.
Parameter name: record
[2010-03-05 18:27:49Z] Error Aborting request 1. Reason follows:
[2010-03-05 18:27:49Z] Error Failed to parse parameter data.
[2010-03-05 18:27:49Z] Error Failed to process connection. Reason:
Argument cannot be null.
Parameter name: s
[2010-03-05 18:27:50Z] Error Aborting request 1. Reason follows:
[2010-03-05 18:27:50Z] Error Failed to parse parameter data.
[2010-03-05 18:27:50Z] Error Failed to process connection. Reason:
Argument cannot be null.
Parameter name: s
[2010-03-05 18:27:52Z] Error Aborting request 1. Reason follows:
[2010-03-05 18:27:52Z] Error Failed to parse parameter data.
[2010-03-05 18:27:52Z] Error Failed to process connection. Reason:
Argument cannot be null.
Parameter name: s
[2010-03-05 18:27:54Z] Error Aborting request 1. Reason follows:
[2010-03-05 18:27:54Z] Error Failed to parse parameter data.
[2010-03-05 18:27:54Z] Error Failed to process connection. Reason:
Argument cannot be null.
Parameter name: s
[2010-03-05 18:27:56Z] Error Request 1 does not exist.
[2010-03-05 18:27:56Z] Error Terminating connection.
[2010-03-05 18:27:56Z] Error Failed to process connection. Reason:
Object reference not set to an instance of an object
[2010-03-05 18:27:57Z] Error Aborting request 1. Reason follows:
[2010-03-05 18:27:57Z] Error Failed to parse parameter data.
[2010-03-05 18:27:57Z] Error Failed to process connection. Reason:
Argument cannot be null.
Parameter name: s
[2010-03-05 18:27:58Z] Error Failed to process connection. Reason: 8
bytes expected.
Parameter name: record
[2010-03-05 18:27:59Z] Error Aborting request 1. Reason follows:
[2010-03-05 18:27:59Z] Error Failed to parse parameter data.
[2010-03-05 18:27:59Z] Error Failed to process connection. Reason:
Argument cannot be null.
Parameter name: s
[2010-03-05 18:27:59Z] Error Aborting request 1. Reason follows:
[2010-03-05 18:27:59Z] Error Failed to parse parameter data.
[2010-03-05 18:27:59Z] Error Failed to process connection. Reason:
Argument cannot be null.
Parameter name: s
[2010-03-05 18:28:01Z] Error Request 1 does not exist.
[2010-03-05 18:28:01Z] Error Terminating connection.
[2010-03-05 18:28:01Z] Error Failed to process connection. Reason:
Object reference not set to an instance of an object
[2010-03-05 18:28:02Z] Error Aborting request 1. Reason follows:
[2010-03-05 18:28:02Z] Error Failed to parse parameter data.
[2010-03-05 18:28:02Z] Error Failed to process connection. Reason:
Argument cannot be null.

Hope someone can point me out the right direction…

Regards,
Ribeiro

Posted at Nginx Forum:

Hello!

On Thu, Mar 11, 2010 at 07:29:24AM -0500, stormdust wrote:

More relevant data: Runing Suse 11.2 with nginx 0.84 and fastcgi
with mono 2.6.

You probably mean nginx 0.8.34 instead?

I identify 3 major problems with nginx:

  • upstream sent unexpected FastCGI record: 3
  • upstream sent unsupported FastCGI protocol version: 116
  • upstream sent unsupported FastCGI protocol version: 60 while reading upstream

One maybe be causing by mono (check mono log).

Nginx log:
2010/03/05 18:27:45 5249#0: *16076 upstream sent unexpected FastCGI record: 3 while reading response header from upstream, client: 127.0.0.1, server: localhost, r$

Request was cancelled by backend via FASTCGI_END_REQUEST record.
It’s basically means that backend is unwilling to process request
for some reason, and nginx considers this to be an error.

You have to look into detailed backend logs to find out what’s
the reason.

2010/03/05 18:27:45 5249#0: *16102 upstream sent unsupported FastCGI protocol version: 116 while reading upstream, client: 127.0.0.1, server: localhost, request: $

Backend sent some gargabe in fastcgi version field (it must be 1),
or protocol happened to be out of sync. Enabling debug logging in
nginx may help to find out what’s happending.

2010/03/05 18:27:45 5249#0: *16148 FastCGI sent in stderr: “Failed to parse parameter data” while reading response header from upstream, client: 127.0.0.1, server$
2010/03/05 18:27:45 5249#0: *16148 upstream sent unexpected FastCGI record: 3 while reading response header from upstream, client: 127.0.0.1, server: localhost, r$

Backend sent error to fastcgi’s stderr and cancelled request via
FASTCGI_END_REQUEST record. See above.

(everything else seems to be the same, skipping)

Parameter name: s
[2010-03-05 18:27:47Z] Error Aborting request 1. Reason follows:
[2010-03-05 18:27:47Z] Error Failed to parse parameter data.
[2010-03-05 18:27:47Z] Error Failed to process connection. Reason: Argument cannot be null.
Parameter name: s
[2010-03-05 18:27:48Z] Error Failed to process connection. Reason: 8 bytes expected.
Parameter name: record
[2010-03-05 18:27:48Z] Error Failed to process connection. Reason: 8 bytes expected.
Parameter name: record
[2010-03-05 18:27:48Z] Error Failed to process connection. Reason: 8 bytes expected.
Parameter name: record

[…]

This doesn’t really explains anything as it lacks any details.

For now I suppose the problem is in mono, and most likely it
manifests itself when full fastcgi record can’t be read via single
read() syscall as it happened to be fragmented into multiple
packets and/or read() was interrupted by signal. I may be wrong
though.

Further analysis require more details - at least nginx debug log.
Something like tcpdump (with packet contents) of problematic
request to backend and more details from mono should be helpful,
too.

Maxim D.

ok, will try to provide more information about the errors then and redue
the tests.

Posted at Nginx Forum:

Hi again, now i made them in debug mode.

http://dl.dropbox.com/u/3669161/hribeiro/mono.zip

http://dl.dropbox.com/u/3669161/hribeiro/Nginx.zip

I have been able to extract the *305 process that gives one error (the
files have at least 19 more)

2010/03/15 11:27:09 3383#0: *305 generic phase: 2
2010/03/15 11:27:09 3383#0: *305 post rewrite phase: 32010/03/15
11:27:09 3383#0: *305 http upstream request: “/Default.aspx?”
2010/03/15 11:27:09 3383#0: *305 http upstream process header
2010/03/15 11:27:09 3383#0: *305 malloc: 0811B858:4096
2010/03/15 11:27:09 3383#0: *305 recv: fd:18 4096 of 4096
2010/03/15 11:27:09 3383#0: *305 http fastcgi record byte: 01
2010/03/15 11:27:09 3383#0: *305 http fastcgi record byte: 06
2010/03/15 11:27:09 3383#0: *305 http fastcgi record byte: 00
2010/03/15 11:27:09 3383#0: *305 http fastcgi record byte: 01
2010/03/15 11:27:09 3383#0: *305 http fastcgi record byte: 00
2010/03/15 11:27:09 3383#0: *305 http fastcgi record byte: 00
2010/03/15 11:27:09 3383#0: *305 http fastcgi record byte: 00
2010/03/15 11:27:09 3383#0: *305 http fastcgi record byte: 00
2010/03/15 11:27:09 3383#0: *305 http fastcgi record length: 0
2010/03/15 11:27:09 3383#0: *305 upstream closed prematurely FastCGI
stdout while reading response header from upstream, client: 10.0.0.60,
server: localhost, request: “GET / HTTP/1.0”, upstream:
“fastcgi://127.0.0.1:9091”, host: “10.0.2.38”
2010/03/15 11:27:09 3383#0: *305 http next upstream, 8
2010/03/15 11:27:09 3383#0: *305 free rr peer 1 4
2010/03/15 11:27:09 3383#0: *305 finalize http upstream request: 502
2010/03/15 11:27:09 3383#0: *305 finalize http fastcgi request
2010/03/15 11:27:09 3383#0: *305 free rr peer 0 0
2010/03/15 11:27:09 3383#0: *305 close http upstream connection: 18
2010/03/15 11:27:09 3383#0: *305 event timer del: 18: 1637136716
2010/03/15 11:27:09 3383#0: *305 http finalize request: 502,
“/Default.aspx?” a:1, c:1
2010/03/15 11:27:09 3383#0: *305 http special response: 502,
“/Default.aspx?”
2010/03/15 11:27:09 3383#0: *305 internal redirect: “/50x.html?”
2010/03/15 11:27:09 3383#0: *305 generic phase: 0
2010/03/15 11:27:09 3383#0: *305 test location: “/”
2010/03/15 11:27:09 3383#0: *305 test location: “50x.html”
2010/03/15 11:27:09 3383#0: *305 using configuration “=/50x.html”
2010/03/15 11:27:09 3383#0: *305 http cl:-1 max:1048576
2010/03/15 11:27:09 3383#0: *305 generic phase: 2

On mono side:

[2010-03-15 11:27:09Z] Debug Accepting an incoming connection.
[2010-03-15 11:27:09Z] Debug Record received. (Type: Params, ID: 1,
Length: 529)
[2010-03-15 11:27:09Z] Debug Record received. (Type: BeginRequest, ID:
1, Length: 8)
[2010-03-15 11:27:09Z] Debug Record received. (Type: Params, ID: 1,
Length: 0)
[2010-03-15 11:27:09Z] Debug Read parameter. ( = )
[2010-03-15 11:27:09Z] Debug Read parameter. ( = )
[2010-03-15 11:27:09Z] Debug Read parameter. ( = )
[2010-03-15 11:27:09Z] Debug Read parameter. ( = FILENAME/Default.aspx
QUERY_STRINGREQUEST_METHODGET CONTENT_TYPE CONTENT_LENGTH
SCRIPT_NA)
[2010-03-15 11:27:09Z] Debug Read parameter.
(/Default.aspxREQUEST_URI/
DOCUMENT_URI/Default.aspx
DOCUMENT_ROOT/home/hr =
ibeiro/wwwrootSERVER_PROTOCOLHTTP/1.0aGATEWAY_INTERFACECGI/1.1SE)
[2010-03-15 11:27:09Z] Debug Read parameter. (ER_SOFTWAREnginx/0.8.34
REMOTE_ADDR10.0.0.60REMOTE_PORT3050 SERVER_ADDR10.0.2. =
38SERVER_PORT901
SERVER_NAMElocalhostREDIRECT_STATUS200`HTTP_USER_AGENTMozilla/5)
[2010-03-15 11:27:09Z] Debug Read parameter. ( (compatible; Webserver
Stress Tool 7; Windows = ); (simulated_by_Webserver_Stress_Tool)
HTTP_HO)
[2010-03-15 11:27:09Z] Debug Record sent. (Type: StandardError, ID: 1,
Length: 31)
[2010-03-15 11:27:09Z] Debug Record sent. (Type: StandardError, ID: 1,
Length: 0)
[2010-03-15 11:27:09Z] Debug Record sent. (Type: EndRequest, ID: 1,
Length: 8)
[2010-03-15 11:27:09Z] Debug Record sent. (Type: EndRequest, ID: 1,
Length: 8)

Im still struggling in finding out were is the problem out here…

Posted at Nginx Forum:

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 :frowning:

Regards,
Ribeiro

Posted at Nginx Forum:

Its seems on Mono log is receiving from nginx:

On error:
[2010-03-15 11:27:09Z] Debug Accepting an incoming connection.
[2010-03-15 11:27:09Z] Debug Record received. (Type: Params, ID: 1,
Length: 529)
[2010-03-15 11:27:09Z] Debug Record received. (Type: BeginRequest, ID:
1, Length: 8)
[2010-03-15 11:27:09Z] Debug Record received. (Type: Params, ID: 1,
Length: 0)

On sucess:
[2010-03-15 11:27:09Z] Debug Accepting an incoming connection.
[2010-03-15 11:27:09Z] Debug Record received. (Type: BeginRequest, ID:
1, Length: 8)
[2010-03-15 11:27:09Z] Debug Record received. (Type: Params, ID: 1,
Length: 529)
[2010-03-15 11:27:09Z] Debug Record received. (Type: Params, ID: 1,
Length: 0)

It seems when it gives this error, Nginx injected first the Params
instead of the BeginRequest.

Posted at Nginx Forum:

Hello!

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

[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
:frowning:

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 D.

just to say this was a mono xsp issue and reporting to the mono crew.

Posted at Nginx Forum:

Did you get the answer to this question? I am facing similar issue on
nginx.

2012/08/21 06:29:02 [debug] 27567#0: *13 http fastcgi record byte: 00
2012/08/21 06:29:02 [debug] 27567#0: *13 http fastcgi record byte: 01
2012/08/21 06:29:02 [debug] 27567#0: *13 http fastcgi record byte: 00
2012/08/21 06:29:02 [debug] 27567#0: *13 http fastcgi record byte: 00
2012/08/21 06:29:02 [debug] 27567#0: *13 http fastcgi record byte: 00
2012/08/21 06:29:02 [debug] 27567#0: *13 http fastcgi record byte: 00
2012/08/21 06:29:02 [debug] 27567#0: *13 http fastcgi record length: 0
2012/08/21 06:29:02 [error] 27567#0: *13 upstream closed prematurely
FastC
GI stdout while reading response header from upstream, client:
10.11.18.32 , server: , request: “GET
/cgi-mod/nph-export_log.cgi?et=1357555736&primar
y_tab=LOG&password=852c5469f9ba3c8bdf5bc8964ea3aded&auth_type=Local&user=a
dmin&locale=en_US&secondary_tab=vpn_log&log=vpn_log HTTP/1.1”,
upstream:
" fastcgi://unix:/var/run/fcgi_socket:", host: “10.11.22.51”,
referrer:
"htt
ps://10.11.22.51/cgi-mod/index.cgi?auth_type=Local&et=1357555726&locale=en

_US&password=066f426d95d849b1d9d6f15849009e80&user=admin&primary_tab=LOG&s
econdary_tab=vpn_log"
2012/08/21 06:29:02 [debug] 27567#0: *13 http next upstream, 8
2012/08/21 06:29:02 [debug] 27567#0: *13 free rr peer 1 4
2012/08/21 06:29:02 [debug] 27567#0: *13 finalize http upstream request:
5
02

Posted at Nginx Forum: