Bad requests with 0-byte response

Hello,

I’m using nginx 0.6.35 with syslog patch, and have a few POST requests
everyday that are aborted by nginx, with no error message being
reported to the error log. The status code returned is 400, and there
is no single byte written by nginx. Those requests are supposed to be
forwarded to a FastCGI application, but the latter is never reached,
connection is aborted right away.

How to diagnose what’s going wrong? Is there a way to trace aborted
requests, or requests to a specific location? If there is no such
possibility, I’ll probably rebuild nginx with the debug configure
switch turned on, but I’m a bit concerned to run it in production,
with thousands of requests every second.

Thanks in advance,

Jean-Baptiste Q.

I found how to activate http logging on specific parts of my site:
[1]error_log directive can be used in the server sections, and
debug_http argument needs to be specified:

Example:

http {
server {
server_name one.org;
error_log logs/one.error debug_http;
}
}

By chance I also noticed that error_log is also supported in specific
locations:

http {
server {
server_name one.org;
location /somewhere {
error_log logs/one.error debug_http;
}
}
}

Thats’s great!

Jean-Baptiste Q.

[1] Module ngx_http_core_module

What about moving the error_log directive documentation to the log
module along with access_log?

Module ngx_http_log_module

Jean-Baptiste Q.

Jean-Baptiste Q. wrote:

What about moving the error_log directive documentation to the log
module along with access_log?

Module ngx_http_log_module

error_log implemented in core module, not in ngx_http_log_module


Anton Y.