On 11/16/2010 01:23 AM, [email protected] wrote: > Author: minfrin > Date: Tue Nov 16 00:23:37 2010 > New Revision: 1035504 > > URL: http://svn.apache.org/viewvc?rev=1035504&view=rev > Log: > Fix pool lifetime issues when the proxy backend connection is terminated > early by forcing a setaside on transient buckets placed in the brigade > by mod_ssl. This has the effect of extending the lifetime of buckets until > the end of the request. This is a variation on the original fix for this > problem, which added transient buckets to be setaside later in the process. > > Modified: > httpd/httpd/trunk/include/ap_mmn.h > httpd/httpd/trunk/modules/proxy/mod_proxy.h > httpd/httpd/trunk/modules/proxy/mod_proxy_http.c > httpd/httpd/trunk/modules/proxy/proxy_util.c > > Modified: httpd/httpd/trunk/include/ap_mmn.h
> > Modified: httpd/httpd/trunk/modules/proxy/proxy_util.c > URL: > http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/proxy/proxy_util.c?rev=1035504&r1=1035503&r2=1035504&view=diff > ============================================================================== > --- httpd/httpd/trunk/modules/proxy/proxy_util.c (original) > +++ httpd/httpd/trunk/modules/proxy/proxy_util.c Tue Nov 16 00:23:37 2010 > @@ -2643,19 +2643,17 @@ PROXY_DECLARE(int) ap_proxy_connection_c > apr_sockaddr_t *backend_addr = conn->addr; > int rc; > apr_interval_time_t current_timeout; > - apr_bucket_alloc_t *bucket_alloc; > > if (conn->connection) { > return OK; > } > > - bucket_alloc = apr_bucket_alloc_create(conn->scpool); > /* > * The socket is now open, create a new backend server connection > */ > conn->connection = ap_run_create_connection(conn->scpool, s, conn->sock, > 0, NULL, > - bucket_alloc); > + c->bucket_alloc); -1 Veto. This does not work. The socket bucket of the backend connection is created from this bucket allocator. Hence the reuse of connections from the backend will be broken as c->bucket_alloc will be gone when the backend connection and hence the socket bucket is reused. The only way that *might* work is to change the bucket allocator *after* the connection is used for the first request (as the socket bucket is created on the fly the first time ap_core_input_filter is used). But this does not resolve the lifetime issue for the first connection. See also http://mail-archives.apache.org/mod_mbox/httpd-dev/201011.mbox/%3c99ea83dcde961346afa9b5ec33fec08b051d3...@vf-mbx11.internal.vodafone.com%3e Regards Rüdiger
