Carlos Rodríguez Colino wrote:
Hi all...

        I have just installed Tomcat 4.1 on a Solaris box and I have realized a
surprising effect: Thread pool creates new threads quickly when a
request burst arrives, but the freeing when they become idle is very
slow (besides, the computer is almost full cpu loaded). Due to this,
several bursts carry out reaching the max number of processes, and
Tomcat stops working.

        My intention is to force idle recent-used threads (lwp in Solaris) to
be killed in a shorter period of time in order to mantain almost
constant the number of lwps in the pool. So, I was going to dive into
CoyoteConnector code to discover and decrease any freeing timeout of the
idle threads, but perhaps some of you can guide me better to get what I
need.

I didn't look in the code recently, but doesn't the threads do a wait() and get a notify() when there is a new request/connection?
In that case you can do a wait(timeout) and after wait returns check if it is woken up for a new request/connection or because of the timeout. If it's the timeout, you can end the thread.


Just a thought.

Greetings,
Ronald.



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to