tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ronald Klop <ronald-mailingl...@base.nl>
Subject Re: decrease idle threads in the pool faster...
Date Wed, 02 Jul 2003 07:43:01 GMT
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: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org


Mime
View raw message