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

Re: (ITS#4585) slapd-search generates TIME_WAIT connections increasingly



> Just for the records: on Solaris 8, shutdown is invoked; connections
> remain in TIME_WAIT (not in CLOSE_WAIT) for a while only at the server's
> side.  Eventually, they get cleared (this happens in minutes, not in
> hours).  The same behavior occurs in Linux.  At the client's side,
> connections get cleared as soon as [tcp_]close() is invoked.  This happens
> irrespective of using AD or OpenLDAP's slapd.  One difference I observe
> between Linux and Solaris is that if slapd-tester is stopped with Ctrl-C,
> client-side connections on Solaris hang out for a while (minutes) in
> TIME_WAIT, while on Linux they get cleared immediately.  in I'm looking
> for pointers in Sun documentation.

According to <http://docs.sun.com/source/816-5794-11/os_tune.html#996755>,
the default time wait on Solaris is 4 minutes; this is confirmed on the
Solaris 8 box I can grab access to right now:

bash-2.03# /usr/sbin/ndd -get /dev/tcp tcp_time_wait_interval
240000

As per why an abruptly shut down connection on Solaris behaves differently
than on Linux, I have no idea.  I suggest you reduce this interval if it
is causing trouble to your application.  You should also make sure in your
build shutdown(2) is called prior to close(2), as suggested in previous
postings.

I'd consider this ITS closed, as it seems to be essentially related to OS
(and specifically to Solaris) details and not to OpenLDAP software.

p.



Ing. Pierangelo Masarati
Responsabile Open Solution
OpenLDAP Core Team

SysNet s.n.c.
Via Dossi, 8 - 27100 Pavia - ITALIA
http://www.sys-net.it
------------------------------------------
Office:   +39.02.23998309          
Mobile:   +39.333.4963172
Email:    pierangelo.masarati@sys-net.it
------------------------------------------