Commit bf24d46f authored by Jim Jagielski's avatar Jim Jagielski
Browse files

Allow for the smax param to be 0, so that all connections

are available to be dropped, should they be idle long
enough.
PR 43371


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@697093 13f79535-47bb-0310-9956-ffa450edef68
parent aebcae10
Loading
Loading
Loading
Loading
+5 −0
Changes for CHANGES: 5 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -2,6 +2,11 @@
Changes with Apache 2.3.0
[ When backported to 2.2.x, remove entry from this file ]

  *) Allow for smax to be 0 for balancer members so that all idle
     connections are able to be dropped should they exceed ttl.
     PR 43371 [Phil Endecott <spam_from_apache_bugzilla chezphil.org>,
     Jim Jagielski]

  *) mod_proxy_ajp: Fix wrongly formatted requests where client
     sets Content-Length header, but doesn't provide a body.
     Servlet container always expects that next packet is
+1 −1
Changes for modules/proxy/mod_proxy.c: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -98,7 +98,7 @@ static const char *set_worker_param(apr_pool_t *p,
    }
    else if (!strcasecmp(key, "ttl")) {
        /* Time in seconds that will destroy all the connections
         * that exced the smax
         * that exceed the smax
         */
        ival = atoi(val);
        if (ival < 1)
+3 −1
Changes for modules/proxy/proxy_util.c: 3 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -1435,6 +1435,7 @@ PROXY_DECLARE(const char *) ap_proxy_add_worker(proxy_worker **worker,
    (*worker)->id   = proxy_lb_workers;
    (*worker)->flush_packets = flush_off;
    (*worker)->flush_wait = PROXY_FLUSH_WAIT;
    (*worker)->smax = -1;
    /* Increase the total worker count */
    proxy_lb_workers++;
    init_conn_pool(p, *worker);
@@ -1455,6 +1456,7 @@ PROXY_DECLARE(proxy_worker *) ap_proxy_create_worker(apr_pool_t *p)
    proxy_worker *worker;
    worker = (proxy_worker *)apr_pcalloc(p, sizeof(proxy_worker));
    worker->id = proxy_lb_workers;
    worker->smax = -1;
    /* Increase the total worker count */
    proxy_lb_workers++;
    init_conn_pool(p, worker);
@@ -1920,7 +1922,7 @@ PROXY_DECLARE(apr_status_t) ap_proxy_initialize_worker(proxy_worker *worker, ser
        if (worker->hmax == 0 || worker->hmax > mpm_threads) {
            worker->hmax = mpm_threads;
        }
        if (worker->smax == 0 || worker->smax > worker->hmax) {
        if (worker->smax == -1 || worker->smax > worker->hmax) {
            worker->smax = worker->hmax;
        }
        /* Set min to be lower then smax */