maxconnections and listen backlog do not overlap. maxconnections limits the number of active connections AOLserver is processing at any one time, and AOLserver pre-allocates space for that many connection structures. The listen backlog limits the number of new connections your operating system will hold for your application to accept() before it starts refusing new connections at the operating system level.

Setting the listen backlog to 32 while maxconnections is set to 100 seems reasonable as long as AOLserver is processing and closing those connections fast enough to accept new ones from the listen backlog so that the backlog doesn't reach 32. If there are 100 connections being processed by AOLserver and 32 connections on the listen backlog at the same time, the operating system will refuse new connections until the backlog is reduced by at least 1.

Is there an optimum value for the listen backlog? That is determined by whether you prefer people wait or get refused immediately by your (busy) server. A connection that is sitting in the listen backlog will probably be dropped after the TCP timeout (usually greater than 2 minutes), but don't quote me on that.

Be aware that using keepalive holds a connection open for longer periods of time; I haven't looked at the code to determine whether those connections take up a slot in the 'maxconnections' bucket, but I suspect that they do as AOLserver needs to maintain the connection information.

There is an interaction between maxthreads and maxconnections, however. If maxthreads is greater than maxconnections, then maxthreads will be set equal to maxconnections.

/s.


It would be interesting to know in what way the maxconnections and
listenbacklog settings affect each other, as: is the maxconnections default
setting of "100" always overruled by "32" of listenbacklog?

------------------------[...]

ns_section ns/parameters
# Number of sockets to use in listen call (default 32)
ns_param     listenbacklog              32

ns_section ns/server/$server
# Max connections to put on queue
ns_param        maxconnections          100

------------------------[...]

On Jul 24, 2006, at 9:01 AM, Bernd Eidenschink wrote:

Hi!

AOLserver 3.5.6 limits the listen backlog to 32 new connections via
the BACKLOG define in nsconf.h. If your server is getting new
connections at a rate faster than AOLserver can accept them, and you
reach the limit of 32 in the listen queue, connections will be
dropped until the backlog drops below 32.



Bernd.


--
AOLserver - http://www.aolserver.com/

To Remove yourself from this list, simply send an email to <[EMAIL PROTECTED]> with the body of "SIGNOFF AOLSERVER" in the email message. You can leave the Subject: field of your email blank.


--
AOLserver - http://www.aolserver.com/

To Remove yourself from this list, simply send an email to <[EMAIL PROTECTED]> 
with the
body of "SIGNOFF AOLSERVER" in the email message. You can leave the Subject: 
field of your email blank.

Reply via email to