Subject: Re: Is it safe to change SOMAXCONN?
To: Paul Hoffman <phoffman@proper.com>
From: Manuel Bouyer <bouyer@antioche.lip6.fr>
List: netbsd-help
Date: 10/02/2000 20:16:45
On Mon, Oct 02, 2000 at 09:12:23AM -0700, Paul Hoffman wrote:
> I have a web server box that rarely gets a load average above 0.2.
> Sometimes, it gets thrashed by a search bot that is ignoring the
> robots.txt protocol and has a zillion queries open at a time. The
> number of active queires seems to be limited by SOMAXCONN from
> /usr/include/sys/socket.h. This causes my web server to start sending
> back zero-length pages. Even when this happened, the load average was
> 0.3, which is quite low.
>
> Right now, it is set to:
>
> #define SOMAXCONN 128
>
> Is it safe for me to up that to, say, 512, and recompile the kernel?
> If so, do I need to recompile anything else? I'd really rather have a
> slow system than one that is sending out bad data.
I think you can do this, yes.
You'll have to recompile all what needs the bigger SOMAXCONN; I'd say at last
libc and the http server.
--
Manuel Bouyer <bouyer@antioche.eu.org>
--