diff -ur httpd-2.2.17.orig/modules/proxy/mod_proxy.c httpd-2.2.17/modules/proxy/mod_proxy.c --- httpd-2.2.17.orig/modules/proxy/mod_proxy.c 2010-10-08 03:51:18.000000000 +0900 +++ httpd-2.2.17/modules/proxy/mod_proxy.c 2011-01-20 12:58:28.000000000 +0900 @@ -92,6 +92,18 @@ worker->retry = apr_time_from_sec(ival); worker->retry_set = 1; } + else if (!strcasecmp(key, "quick_retry")) { + ival = atoi(val); + if (ival < 1) + return "Quick_Retry must be at least one second"; + worker->quick_retry = apr_time_from_sec(ival); + } + else if (!strcasecmp(key, "quick_retry_max")) { + ival = atoi(val); + if (ival < 0) + return "Quick_Retry_Max must be a positive number"; + worker->quick_retry_max = ival; + } else if (!strcasecmp(key, "ttl")) { /* Time in seconds that will destroy all the connections * that exceed the smax Only in httpd-2.2.17/modules/proxy: mod_proxy.c~ diff -ur httpd-2.2.17.orig/modules/proxy/mod_proxy.h httpd-2.2.17/modules/proxy/mod_proxy.h --- httpd-2.2.17.orig/modules/proxy/mod_proxy.h 2010-10-08 03:51:18.000000000 +0900 +++ httpd-2.2.17/modules/proxy/mod_proxy.h 2011-01-20 12:59:27.000000000 +0900 @@ -313,6 +313,8 @@ struct proxy_worker { int id; /* scoreboard id */ apr_interval_time_t retry; /* retry interval */ + apr_interval_time_t quick_retry; /* quick retry interval */ + int quick_retry_max; /* quick retry max */ int lbfactor; /* initial load balancing factor */ const char *name; const char *scheme; /* scheme to use ajp|http|https */ Only in httpd-2.2.17/modules/proxy: mod_proxy.h~ diff -ur httpd-2.2.17.orig/modules/proxy/proxy_util.c httpd-2.2.17/modules/proxy/proxy_util.c --- httpd-2.2.17.orig/modules/proxy/proxy_util.c 2010-08-25 23:10:14.000000000 +0900 +++ httpd-2.2.17/modules/proxy/proxy_util.c 2011-01-20 13:02:09.000000000 +0900 @@ -1873,6 +1873,10 @@ if (!worker->retry_set) { worker->retry = apr_time_from_sec(PROXY_WORKER_DEFAULT_RETRY); } + if (!worker->quick_retry) + worker->quick_retry = apr_time_from_sec(PROXY_WORKER_DEFAULT_RETRY); + if (!worker->quick_retry_max) + worker->quick_retry_max = 0; /* By default address is reusable unless DisableReuse is set */ if (worker->disablereuse) { worker->is_address_reusable = 0; @@ -1949,7 +1953,15 @@ ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s, "proxy: %s: retrying the worker for (%s)", proxy_function, worker->hostname); - if (apr_time_now() > worker->s->error_time + worker->retry) { + if (worker->s->retries < worker->quick_retry_max && apr_time_now() > worker->s->error_time + worker->quick_retry) { + ++worker->s->retries; + worker->s->status &= ~PROXY_WORKER_IN_ERROR; + ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s, + "proxy: %s: worker for (%s) has been marked for quick_retry", + proxy_function, worker->hostname); + return OK; + } + else if (apr_time_now() > worker->s->error_time + worker->retry) { ++worker->s->retries; worker->s->status &= ~PROXY_WORKER_IN_ERROR; ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s, Only in httpd-2.2.17/modules/proxy: proxy_util.c~