> From: ped [mailto:[EMAIL PROTECTED]
> Subject: RE: Tomcat thread pool question
>
> So that implies that Tomcat only supports a max of 3 threads...

Obviously untrue, since the default is 200.

> I uncommented:
>  <Executor name="tomcatThreadPool" namePrefix="catalina-exec-"
>    maxThreads="150" minSpareThreads="1"/>
> in Tomcat's server.xml. But I still see the problem when I cap
> my db connection pool at 3.

A useless exercise unless you changed all of the <Connector> elements you're 
using to utlize the executor; if you didn't, each <Connector> has its own 
thread pool.

> I would think that I should be able to increase the number of
> threads available to Tomcat to prevent this problem

You cannot fix this problem in Tomcat, since you have turned over 
responsibility for server resources to the client(s).  The Tomcat thread pool 
is finite; we'll call the maxThread value T.  Likewise, the db connection pool 
is finite, and we'll call its size D.  The client makes some number of requests 
that are not committed, which we'll label R.  Anytime R > T + D, you're stuck.  
The first D requests get processed, *do not* return the db connection to the 
pool, respond to the client, and return to the thread pool.  The next T 
requests get stuck in the db pool waiting for db connections to become 
available.  At this point, the db pool is fully consumed, the thread pool is 
fully consumed, and some number of subsequent requests are held in the 
platform's TCP/IP stack.  Since you have no control over the clients (at least 
in the real world), you cannot ever configure T and D large enough to exceed 
all possible values of R; one of them would have to be infinite.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
MATERIAL and is thus for use only by the intended recipient. If you received 
this in error, please contact the sender and delete the e-mail and its 
attachments from all computers.

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

Reply via email to