Hi,

I had a problem with one of my AOLServers (4.0.10): under heavy load all threads associated with one of the virtual servers sometimes disappear. I have changed "connsperthread" connection pool parameter to 0 and now all seems to work. I've examined source code and found the following (possible?) scenario:

There are two threads, one for driver and one running connection. Moreover, the pool parameter "connsperthread" is set to 1 (so, every thread exits after running a connection).

1) In function NsConnThread (file "queue.c") thread finishes running connection. Then it set poolPtr->threads.idle=1 and unlock mutex &servPtr->pools.lock calling NsRunAtReadyProcs.

2) Now a new connection arrives. In function NsQueueConn (file "queue.c") driver thread checks that poolPtr.threads.idle==1, so it does not create any new thread. The connection is queued.

3) Thread from the point (1) exits without serving new connection, since it has "ncons" set to 1. It decrement poolPtr.threads.idle to 0.

4) Now there is one queued connection, poolPtr.threads.idle==0, and there is no thread to run queued connection.

Is it possible?

Best regards,

Piotr Szuca


--
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