[2276] in linux-net channel archive

home help back first fref pref prev next nref lref last post

Re: Intermittent Connection Problems

daemon@ATHENA.MIT.EDU (Doug Ledford)
Thu Mar 28 19:55:48 1996

Date: 	Thu, 28 Mar 1996 13:45:10 -0600 (CST)
From: Doug Ledford <dledford@dialnet.net>
To: Master of Wonder <root@ns1.wwi.com>
cc: linux-net@vger.rutgers.edu
In-Reply-To: <199603281534.HAA31600@wonder.wwi.com>

On Thu, 28 Mar 1996, Master of Wonder wrote:

> Hello, I'm running Linux 1.2.13 and someonee recently complained that
> they had trouble connecting to my A) web server, B) mail server
> (which is the same machine).  I logged into my provider's machine,
> attempted to make a connection using lynx, and sure enough 2 out of 3
> times, I can't connect to my own server.  Any ideas?  Help would be
> most appreciated as I have a few customers that are not very happy
> with this situation.  Thank you in advance!

I have been having about the same problem with my system.  Web server, 
mail server, and shell server are all the same machine.  Sometimes people 
can use the mail ports, sometimes they can't, etc.  Here's what I found:

1)	Whenever people can't connect, I can usually kill some waiting
	sendmail daemons to free up some sockets and then they can 
	connect again.

2)	I had upped the maximum number of sockets from 2000 to 4000 in
	/usr/include/linux/net.h, but this didn't help.  I also upped
	the number of unix domain sockets from 128 to 1024 in the same
	file, got rid of the Unix: Create: error messages.

3)	When looking into /proc/net/sockstat, I noticed that the 
	SOCK_ARRAY_SIZE was always 256, no matter what the limit on
	sockets was in linux/net.h.  I also noticed that after some
	period of time where people couldn't connect, the values for
	TCP: highest xxx would be VERY close to the 256 limit, minus
	the normal number of UDP and RAW sockets on the system.

4)	For this reason I went grepping around various include files
	for any #defines of SOCK_ARRAY_SIZE.  I found it in 
	/usr/src/linux/net/inet/sock.h.  It was set to 256, I upped it
	to 1024, removed inet.o and sock.o and recompiled the kernel.

5)	Now, catting /proc/net/sockstat shows SOCK_ARRAY_SIZE is indeed
	1024, so I'm waiting to see if this fixes my problem.

My guess as to the cause of the problem is the number of web hits we get 
and the number of sockets I have on port 80 in the CLOSING_WAIT, 
FIN_WAIT2, etc. states filling up the SOCK_ARRAY.  I surmised that upping 
the SOCK_ARRAY_SIZE to 1024 would allow me a much greater number of these 
partially closed sockets before the system would fill up and not respond 
to incoming network connections.  If I'm wrong, or if I've done something 
I shouldn't have, then someone please let me know :)

*****************************************************************************
* Doug Ledford                      *   Unix, Novell, Dos, Windows 3.x,     *
* dledford@dialnet.net    873-DIAL  *     WfW, Windows 95 & NT Technician   *
*   PPP access $14.95/month         *****************************************
*   Springfield, MO and surrounding * Usenet news, e-mail and shell account.*
*   communities.  Sign-up online at * Web page creation and hosting, other  *
*   873-9000 V.34                   * services available, call for info.    *
*****************************************************************************



home help back first fref pref prev next nref lref last post