# this time, this server will initiate "zombie_period".
# The response window can be a number between 0.001 and 60.000
# Though values on the low end are discouraged.
+ # See also "max_response_timeouts".
#
# The response window is large because responses MAY be slow,
# especially when proxying across the Internet.
response_window = 20
#
+ # Ignore this many replies missing "response_window"
+ # before starting zombie period.
+ #
+ max_response_timeouts = 0
+
+ #
# If you want the old behaviour of the server rejecting
# proxied requests after "response_window" timeout, set
# the following configuration item to "yes".
struct timeval when;
struct timeval response_window;
+ uint32_t response_timeouts;
+ uint32_t max_response_timeouts;
uint32_t max_outstanding; /* don't overload it */
uint32_t currently_outstanding;
*/
if (request->home_server->state == HOME_STATE_UNKNOWN) {
request->home_server->state = HOME_STATE_ALIVE;
+ request->home_server->response_timeouts = 0;
}
#ifdef WITH_STATS
* pings.
*/
home->state = HOME_STATE_ALIVE;
+ home->response_timeouts = 0;
exec_trigger(request, home->cs, "home_server.alive", false);
home->currently_outstanding = 0;
home->num_sent_pings = 0;
#endif
home->state = HOME_STATE_ALIVE;
+ home->response_timeouts = 0;
home_trigger(home, "home_server.alive");
home->currently_outstanding = 0;
gettimeofday(&home->revive_time, NULL);
&& (home->proto != IPPROTO_TCP)
#endif
) {
- mark_home_server_zombie(home, &now, response_window);
+ home->response_timeouts++;
+ if (home->response_timeouts > home->max_response_timeouts)
+ mark_home_server_zombie(home, &now, response_window);
}
FR_STATS_TYPE_INC(home->stats.total_timeouts);
{ "src_ipaddr", FR_CONF_POINTER(PW_TYPE_STRING, &hs_srcipaddr), NULL },
{ "response_window", FR_CONF_OFFSET(PW_TYPE_TIMEVAL, home_server_t, response_window), "30" },
+ { "max_response_timeouts", FR_CONF_OFFSET(PW_TYPE_INTEGER, home_server_t, max_response_timeouts), "0" },
{ "max_outstanding", FR_CONF_OFFSET(PW_TYPE_INTEGER, home_server_t, max_outstanding), "65536" },
{ "zombie_period", FR_CONF_OFFSET(PW_TYPE_INTEGER, home_server_t, zombie_period), "40" },
if ((home->state == HOME_STATE_IS_DEAD) &&
(home->ping_check == HOME_PING_CHECK_NONE)) {
home->state = HOME_STATE_ALIVE;
+ home->response_timeouts = 0;
if (!found) found = home;
}
}