Mail Archives: cygwin-developers/2002/07/29/17:27:53
"Pierre A. Humblet" <Pierre DOT Humblet AT ieee DOT org> wrote:
> On my Win98 the exim mail server accepts hundreds of connections
> (over hours, days and weeks) without problems....
> One hundred is about the default max # simultaneous tcp
> Does netstat -an show them, e.g. in TIME_WAIT?
> If they happen in a short time (minutes) you may be hitting the
> default linger timeout. Have you tried setting linger ON with a
It does seem to be something to do with TIME_WAIT and linger but
I'm unclear exactly what. Do any of the following sound familiar?
*) The original problem (with a clean copy of CVS head, compiled
either w/ or w/o debugging enabled) was that the server would
accept a certain number of successive connections then refuse to
accept any more until it was restarted. Waiting a substantial
amount of time didn't clear the problem up, only re-starting the
server worked, so I don't see how it's a TIME_WAIT problem.
*) I just hacked the linger setting out of fhandler_socket::close
and now the server seems to accept an unbounded number of
successive connections. I just tried 10000, which is more than
twice the number of temporary ports, w/o any problem.
I'll try some more combinations, but interestingly I can't
recreate this with my direct winsock2 server: linger or not it
runs forever too. I'll try some more combinations.
Another strangeness I'm getting is that if I run netstat -a on my
win98/SE box, it never shows more than 10 connections (e.g. one
LISTENING and nine, the most recent nine port numbers, in
TIME_WAIT). This is regardless of the other changes I've
described. There must be more ports in TIME_WAIT than that
(especially with the linger setting in cygwin) so what's up? Is
netstat known to be dodgy on win98?
> > Nicholas Wourms (my (un)willing test accomplice) reported "~3
> > minutes" of run time before hitting the same error: so he's
> > getting a thousand or so (?) connections by the sounds of it.
> Win98 or ME? If it's ME that reminds of the Xserver problem
> we had a year ago.
I'm assuming ME but Nicholas has yet to confirm that. I'll go
check the archives for this xserver issue.
Until, I hope we're all having fun :-)
- Raw text -