From: Chuck Murcko Date: Sun, 12 Aug 2001 21:24:35 +0000 (+0000) Subject: Make the body read in proxy http handler nonblocking. There's no sense X-Git-Tag: 2.0.24~116 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b4118f1e32411a28b42b99697c3bb1f370af681a;p=apache Make the body read in proxy http handler nonblocking. There's no sense in serializing 4-8 client connections into a single origin server connection, as is the blocking behavior. Added instrumentation that we don't want compiled in normally to assist in debugging chunking problems. apr_get_brigade is apparently blocking during chunked body fetch, or proxy_http_handler is getting deadlocked with the dechunk filter. Show PID for prefork debugging. We'll figure out getting TIDs later. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@90127 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/modules/proxy/proxy_http.c b/modules/proxy/proxy_http.c index bc4edd3b50..9d461ed4ca 100644 --- a/modules/proxy/proxy_http.c +++ b/modules/proxy/proxy_http.c @@ -796,7 +796,11 @@ int ap_proxy_http_handler(request_rec *r, proxy_server_conf *conf, "proxy: start body send"); /* read the body, pass it to the output filters */ - while (ap_get_brigade(rp->input_filters, bb, AP_MODE_BLOCKING, &readbytes) == APR_SUCCESS) { + while (ap_get_brigade(rp->input_filters, bb, AP_MODE_NONBLOCKING, &readbytes) == APR_SUCCESS) { +#if DEBUGGING + ap_log_error(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, 0, r->server, + "proxy (PID %d): readbytes: %#x", getpid(), readbytes); +#endif if (APR_BUCKET_IS_EOS(APR_BRIGADE_LAST(bb))) { ap_pass_brigade(r->output_filters, bb); break;