# HG changeset patch # User Igor Sysoev # Date 1168876851 0 # Node ID 5a86fcc480c69b258190e0d6fd7798ebda8dc543 # Parent ce08bc4cb97b629b2650e5a0213ac0e3882e1b64 add debug logging for FastCGI zero size buf alert diff --git a/src/event/ngx_event_pipe.c b/src/event/ngx_event_pipe.c --- a/src/event/ngx_event_pipe.c +++ b/src/event/ngx_event_pipe.c @@ -531,6 +531,12 @@ ngx_event_pipe_write_to_downstream(ngx_e } else if (!p->cachable && p->in) { cl = p->in; + ngx_log_debug3(NGX_LOG_DEBUG_EVENT, p->log, 0, + "pipe write buf ls:%d %p %z", + cl->buf->last_shadow, + cl->buf->pos, + cl->buf->last - cl->buf->pos); + if (cl->buf->recycled && cl->buf->last_shadow && bsize + cl->buf->last - cl->buf->pos > p->busy_size) diff --git a/src/http/modules/ngx_http_fastcgi_module.c b/src/http/modules/ngx_http_fastcgi_module.c --- a/src/http/modules/ngx_http_fastcgi_module.c +++ b/src/http/modules/ngx_http_fastcgi_module.c @@ -1310,6 +1310,9 @@ ngx_http_fastcgi_input_filter(ngx_event_ ngx_log_debug1(NGX_LOG_DEBUG_EVENT, p->log, 0, "input buf #%d", b->num); + ngx_log_debug2(NGX_LOG_DEBUG_EVENT, p->log, 0, + "input buf %p %z", b->pos, b->last - b->pos); + if (f->pos + f->length < f->last) { @@ -1350,6 +1353,9 @@ ngx_http_fastcgi_input_filter(ngx_event_ b->shadow = buf; b->last_shadow = 1; + ngx_log_debug2(NGX_LOG_DEBUG_EVENT, p->log, 0, + "input buf last %p %z", b->pos, b->last - b->pos); + return NGX_OK; }