On Friday 19 October 2007 03:17, Gustaf Neumann wrote: > I have commited a patch to cvs head, that processes these pending > requests, even when maxconns is exceeded. Maybe it is better to > restart exiting connection threads automatically or to limit the > number of queued requests at first hand; or maybe there is a callback > solution. However. I have removed the old - useless - patch > from the head version in CVS. >
More on the patch and the problem. Your code comment is that: + request is queued without resources to process these. + One has to take care about that one restarts the queue, when + resources become available again. The only way the driver thread could guess if a queue has resources is to look at the number of maxthreads, making sure it is at least 1. But it would only be a guess, it could instantly change to zero if someone decided to zero out the threadpool. How exactly does the patch work? It appears to simply extend the tour-of-duty for a thread, but does the exiting thread ever get to trigger the queue to create new threads? This seemed to be the issue several users noticed: exiting threads never cause the queue to reassess the situation. At the very least, it seems that when a thread exits, the queue checks if the number of threads is less than minthreads, and if so, creates a new thread, but also creates a new thread if minthreads = 0 and there are queued requests. Then the queue should loop over requests creating threads for queued requests until it reaches maxthreads. Okay, maybe restate this: the queue should loop over requests up to the point of reaching maxthreads. If there is a spike in activity, it is best to immediately respond with more threads up to the limit. I think the opposite iw what is happening. Once threads die, it is nearly impossible to get the number of threads back up, and threads is how long requests are handled, otherwise the wait time is additive. tom jackson -- 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.
