Subject: Is it safe to change SOMAXCONN?
To: None <netbsd-help@netbsd.org>
From: Paul Hoffman <phoffman@proper.com>
List: netbsd-help
Date: 10/02/2000 09:12:23
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.

--Paul Hoffman