[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: One more bug
From: |
Jan-Henrik Haukeland |
Subject: |
Re: One more bug |
Date: |
18 Feb 2003 00:05:01 +0100 |
User-agent: |
Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.4 (Civil Service) |
Rory Toma <address@hidden> writes:
> Actually, the sympton was the reverse. Monit would die just fine (all
> threads) but the socket hadn't timed out yet. So, when monit_http ran,
> it would find the socket in use, and exit. However, the rest of the
> threads would keep running.
Aha, this is another problem. In this case it's the OS's "fault". If
there is data on a socket/port the OS may choose not to release the
port for some time (and prevent other sockets to bind to the port;
google for TIME_WAIT). We use the SO_REUSEADDR socket option on the
server socket (man 7 socket) so the OS should allow the program to
bind to the port even if there is activities on a previous socket
bound to the same port and that's really (almost) all we can to from a
programs viewpoint.
--
Jan-Henrik Haukeland