[Date Prev][Date Next] [Chronological] [Thread] [Top]

connections_timeout_idle



>From ITS#2389: if a client sends a long stream of requests without reading
any of the replies, slapd will eventually stop reading requests from the
client. (Otherwise slapd will lockup as its sendbuffer gets full.) As a
consequence of this new behavior, if the client *never* reads its replies,
and just closes the connection, slapd will never see the close because it's
no longer select'ing for read on that socket. (If the client *does* read a
reply, and the socket becomes writable again, then select/read will be
re-enabled.)

To avoid having these hung connections lying around forever, it seems we need
the default for global_idletimeout to be non-zero, or we need a new
idletimeout variable for "exceptional conditions" such as this.

Also, in daemon.c, if slapd runs out of file descriptors, the
connections_timeout_idle() function is invoked to reap some idle connections.
However, it uses global_idletimeout which defaults to zero. This means, when
slapd runs out of file descriptors, all connections which were not active
within 1 second from "now" will be closed. So again, it seems we need the
default for global_idletimeout to be non-zero, or we need a separate
exception timeout for these emergency situations.

I would prefer not to change the global_idletimeout default. Thoughts?

  -- Howard Chu
  Chief Architect, Symas Corp.       Director, Highland Sun
  http://www.symas.com               http://highlandsun.com/hyc
  Symas: Premier OpenSource Development and Support