httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Giovanni Maruzzelli <mar...@matrice.it>
Subject [BUG] 1.3 not closing socket on NT
Date Tue, 02 Sep 1997 18:31:39 GMT
Hi,

I've not seen a fix for this annoying bug, so, this is the way
to reproduce it:

You can connect from Netscape or lynx from a Unix box
to an Apache NT box.

The sockets on the NT side remains in TIME_WAIT state.


But if you use something like this perl script, no problems
at all:

========================================================

#!/usr/bin/perl

require 'sys/socket.ph';

$time=100;

for($i=0; $i<$time; $i++)
	{
	$port= 80;
	$hostname="struso.matrice.it";

	select S;
	$|=1;
	select(stdout);

	$sockaddr = 'Sna4x8';

	($name, $aliases, $proto) = getprotobyname('tcp');
	($name, $aliases, $type, $len, $thisaddr) = gethostbyname($hostname);

	$thisport = pack($sockaddr, &AF_INET, 0, $thisaddr);    
	$thatport = pack($sockaddr, &AF_INET, $port, $thisaddr);

	socket(S, &PF_INET, &SOCK_STREAM, $proto) || die "no socket\n";

	connect(S, $thatport) || die "no connect\n";

	print S "GET /index.html HTTP/1.0\n";
#	print S "Authorization: Basic aGFubmVzOmhhbm5lcw==\n\n";


	while (<S>)
        	{
#        	print;
        	}
	shutdown(S, 1);

	close(S);
	}
exit 0;

==============================================================
So, it seems to that is something to do with the lingering
options to setsockopt, or with the shutdown of the socket.

Actually the sockets remains in the TIME_WAIT status for 
4 minutes and something, but I don't think the solution
can be to modificate the NT registry entering a new entry
to bypass the defaults (as in the Microsoft KB article mentioned).

I have not tools to analyze deeply wat happens at the protocol level...

This is indeed a big problem, 'cause a few hundred connection can freeze
the server....

ciao,

-giovanni


 
          ***********************************************
          *                                             *
          *                                             *
          *    MATRICE srl                              *
          *    Information Technology Solutions         *
          *                                             *
          *    Giovanni Maruzzelli                      *
          *                                             *
          *                                             *
          *    tel. (+39)(2)2952 0481                   *
          *    fax  (+39)(2)2952 0528                   *
          *    maruzz@matrice.it                        *
          *    http://www.matrice.it                    *
          ***********************************************


Mime
View raw message