tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Thomas <ma...@apache.org>
Subject Re: maxWait
Date Tue, 30 Apr 2013 12:22:05 GMT
On 30/04/2013 12:59, Jose MarĂ­a Zaragoza wrote:
> Hello:
> 
> I'm using Tomcat 6.0.23
> I'm using DBCP library to pooling database connections.
> 
> When I define a <Resource> in context.xml
> and set  maxWait to 2000 ms ,
> sometimes datasource.getConnection() method lasts 15 seconds.
> 
> I've to define loginTimeout parameter in JDBC driver to get the effect that
> I want  : a timeout retrieving a Connection
> 
> What is the meaning of maxWait ? When is triggered this timeout (maxWait) ?

maxWait is the maximum time DBCP will wait for a connection to become
available if the pool is at full capacity (i.e. all permitted
connections have been created and are currently allocated to other clients).

In your case, no connection is available and there is still spare
capacity in the pool so a new connection is created. That will take as
long as it takes. Tomcat & DBCP have no control over it.

Mark


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message