View | Details | Raw Unified | Return to bug 48388
Collapse All | Expand All

(-)modules/proxy/mod_proxy_balancer.c (-1 / +3 lines)
Lines 612-618 static int proxy_balancer_post_request(proxy_worke Link Here
612
            balancer->name);
612
            balancer->name);
613
        return HTTP_INTERNAL_SERVER_ERROR;
613
        return HTTP_INTERNAL_SERVER_ERROR;
614
    }
614
    }
615
    if (!apr_is_empty_array(balancer->errstatuses)) {
615
    if (!apr_is_empty_array(balancer->errstatuses)
616
        && !(worker->s->status & PROXY_WORKER_IGNORE_ERRORS)) {
616
        int i;
617
        int i;
617
        for (i = 0; i < balancer->errstatuses->nelts; i++) {
618
        for (i = 0; i < balancer->errstatuses->nelts; i++) {
618
            int val = ((int *)balancer->errstatuses->elts)[i];
619
            int val = ((int *)balancer->errstatuses->elts)[i];
Lines 630-635 static int proxy_balancer_post_request(proxy_worke Link Here
630
    }
631
    }
631
632
632
    if (balancer->failontimeout
633
    if (balancer->failontimeout
634
        && !(worker->s->status & PROXY_WORKER_IGNORE_ERRORS)
633
        && (apr_table_get(r->notes, "proxy_timedout")) != NULL) {
635
        && (apr_table_get(r->notes, "proxy_timedout")) != NULL) {
634
        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
636
        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
635
                      "%s: Forcing worker (%s) into error state "
637
                      "%s: Forcing worker (%s) into error state "
(-)modules/proxy/proxy_util.c (-1 / +2 lines)
Lines 1960-1966 PROXY_DECLARE(int) ap_proxy_retry_worker(const cha Link Here
1960
        ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s,
1960
        ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s,
1961
                    "proxy: %s: retrying the worker for (%s)",
1961
                    "proxy: %s: retrying the worker for (%s)",
1962
                     proxy_function, worker->hostname);
1962
                     proxy_function, worker->hostname);
1963
        if (apr_time_now() > worker->s->error_time + worker->retry) {
1963
        if ((worker->s->status & PROXY_WORKER_IGNORE_ERRORS)
1964
            || apr_time_now() > worker->s->error_time + worker->retry) {
1964
            ++worker->s->retries;
1965
            ++worker->s->retries;
1965
            worker->s->status &= ~PROXY_WORKER_IN_ERROR;
1966
            worker->s->status &= ~PROXY_WORKER_IN_ERROR;
1966
            ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s,
1967
            ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s,
(-)modules/proxy/mod_proxy.c (-2 / +10 lines)
Lines 1045-1051 static int proxy_handler(request_rec *r) Link Here
1045
             * We can not failover to another worker.
1045
             * We can not failover to another worker.
1046
             * Mark the worker as unusable if member of load balancer
1046
             * Mark the worker as unusable if member of load balancer
1047
             */
1047
             */
1048
            if (balancer) {
1048
            if (balancer
1049
                && !(worker->s->status & PROXY_WORKER_IGNORE_ERRORS)) {
1049
                worker->s->status |= PROXY_WORKER_IN_ERROR;
1050
                worker->s->status |= PROXY_WORKER_IN_ERROR;
1050
                worker->s->error_time = apr_time_now();
1051
                worker->s->error_time = apr_time_now();
1051
            }
1052
            }
Lines 1056-1062 static int proxy_handler(request_rec *r) Link Here
1056
             * We can failover to another worker
1057
             * We can failover to another worker
1057
             * Mark the worker as unusable if member of load balancer
1058
             * Mark the worker as unusable if member of load balancer
1058
             */
1059
             */
1059
            if (balancer) {
1060
            if (balancer
1061
                && !(worker->s->status & PROXY_WORKER_IGNORE_ERRORS)) {
1060
                worker->s->status |= PROXY_WORKER_IN_ERROR;
1062
                worker->s->status |= PROXY_WORKER_IN_ERROR;
1061
                worker->s->error_time = apr_time_now();
1063
                worker->s->error_time = apr_time_now();
1062
            }
1064
            }
Lines 1404-1409 static const char * Link Here
1404
            const char *err = ap_proxy_add_worker(&worker, cmd->pool, conf, r);
1406
            const char *err = ap_proxy_add_worker(&worker, cmd->pool, conf, r);
1405
            if (err)
1407
            if (err)
1406
                return apr_pstrcat(cmd->temp_pool, "ProxyPass ", err, NULL);
1408
                return apr_pstrcat(cmd->temp_pool, "ProxyPass ", err, NULL);
1409
            /* Ignore (disable-on-)errors for non balancer-members */
1410
            worker->status |= PROXY_WORKER_IGNORE_ERRORS;
1407
        } else {
1411
        } else {
1408
            ap_log_error(APLOG_MARK, APLOG_INFO, 0, cmd->server,
1412
            ap_log_error(APLOG_MARK, APLOG_INFO, 0, cmd->server,
1409
                         "worker %s already used by another worker", worker->name);
1413
                         "worker %s already used by another worker", worker->name);
Lines 1906-1911 static const char * Link Here
1906
                if (err)
1910
                if (err)
1907
                    return apr_pstrcat(cmd->temp_pool, "ProxySet ",
1911
                    return apr_pstrcat(cmd->temp_pool, "ProxySet ",
1908
                                       err, NULL);
1912
                                       err, NULL);
1913
                /* Ignore (disable-on-)errors for non balancer-members */
1914
                worker->status |= PROXY_WORKER_IGNORE_ERRORS;
1909
            }
1915
            }
1910
            else
1916
            else
1911
                return apr_pstrcat(cmd->temp_pool, "ProxySet can not find '",
1917
                return apr_pstrcat(cmd->temp_pool, "ProxySet can not find '",
Lines 2051-2056 static const char *proxysection(cmd_parms *cmd, vo Link Here
2051
                if (err)
2057
                if (err)
2052
                    return apr_pstrcat(cmd->temp_pool, thiscmd->name,
2058
                    return apr_pstrcat(cmd->temp_pool, thiscmd->name,
2053
                                       " ", err, NULL);
2059
                                       " ", err, NULL);
2060
                /* Ignore (disable-on-)errors for non balancer-members */
2061
                worker->status |= PROXY_WORKER_IGNORE_ERRORS;
2054
            }
2062
            }
2055
        }
2063
        }
2056
        if (worker == NULL && balancer == NULL) {
2064
        if (worker == NULL && balancer == NULL) {

Return to bug 48388