[nginx] Request body: improved logging.

Maxim Dounin mdounin at mdounin.ru
Mon Nov 9 21:21:39 UTC 2020


details:   https://hg.nginx.org/nginx/rev/4d5b04daeaff
branches:  
changeset: 7739:4d5b04daeaff
user:      Maxim Dounin <mdounin at mdounin.ru>
date:      Mon Nov 09 22:40:53 2020 +0300
description:
Request body: improved logging.

Added logging before returning NGX_HTTP_INTERNAL_SERVER_ERROR if there
are busy buffers after a request body flush.  This should never happen
with current code, though bugs can be introduced by 3rd party modules.
Make sure debugging will be easy enough.

diffstat:

 src/http/ngx_http_request_body.c |  3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diffs (13 lines):

diff -r 554c6ae25ffc -r 4d5b04daeaff src/http/ngx_http_request_body.c
--- a/src/http/ngx_http_request_body.c	Fri Nov 06 23:44:54 2020 +0300
+++ b/src/http/ngx_http_request_body.c	Mon Nov 09 22:40:53 2020 +0300
@@ -305,6 +305,9 @@ ngx_http_do_read_client_request_body(ngx
                         return NGX_AGAIN;
                     }
 
+                    ngx_log_error(NGX_LOG_ALERT, c->log, 0,
+                                  "busy buffers after request body flush");
+
                     return NGX_HTTP_INTERNAL_SERVER_ERROR;
                 }
 


More information about the nginx-devel mailing list