-*- coding: utf-8 -*-
Changes with Apache 2.5.0
+ *) mod_proxy: Don't put non balancer-member workers in error state by
+ default for connection or 500/503 errors, and honor status=+I for
+ any error. PR 48388. [Yann Ylavic]
+
*) mod_include: the 'env' function was incorrectly handled as 'getenv' if the
leading 'e' was written in upper case in <!--#if expr="..." -->
statements. [Christophe Jaillet]
* We can not failover to another worker.
* Mark the worker as unusable if member of load balancer
*/
- if (balancer) {
+ if (balancer
+ && !(worker->s->status & PROXY_WORKER_IGNORE_ERRORS)) {
worker->s->status |= PROXY_WORKER_IN_ERROR;
worker->s->error_time = apr_time_now();
}
* We can failover to another worker
* Mark the worker as unusable if member of load balancer
*/
- if (balancer) {
+ if (balancer
+ && !(worker->s->status & PROXY_WORKER_IGNORE_ERRORS)) {
worker->s->status |= PROXY_WORKER_IN_ERROR;
worker->s->error_time = apr_time_now();
}
return HTTP_INTERNAL_SERVER_ERROR;
}
- if (!apr_is_empty_array(balancer->errstatuses)) {
+ if (!apr_is_empty_array(balancer->errstatuses)
+ && !(worker->s->status & PROXY_WORKER_IGNORE_ERRORS)) {
int i;
for (i = 0; i < balancer->errstatuses->nelts; i++) {
int val = ((int *)balancer->errstatuses->elts)[i];
}
if (balancer->failontimeout
+ && !(worker->s->status & PROXY_WORKER_IGNORE_ERRORS)
&& (apr_table_get(r->notes, "proxy_timedout")) != NULL) {
ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(02460)
"%s: Forcing worker (%s) into error state "
else {
*wshared->uds_path = '\0';
}
+ if (!balancer) {
+ wshared->status |= PROXY_WORKER_IGNORE_ERRORS;
+ }
(*worker)->hash = wshared->hash;
(*worker)->context = NULL;
server_rec *s)
{
if (worker->s->status & PROXY_WORKER_IN_ERROR) {
- if (apr_time_now() > worker->s->error_time + worker->s->retry) {
+ if ((worker->s->status & PROXY_WORKER_IGNORE_ERRORS)
+ || apr_time_now() > worker->s->error_time + worker->s->retry) {
++worker->s->retries;
worker->s->status &= ~PROXY_WORKER_IN_ERROR;
ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s, APLOGNO(00932)