> From: cjder...@gmail.com [mailto:cjder...@gmail.com] On Behalf Of chris derham
> Subject: Problem with connection pool

> So what I deduce is that a connection goes to server, 
> obtains the lock, and then somehow swapped out and so 
> never commits transaction, hence lock is never released,
> hence issue.

What do you mean by "swapped out"?  Do you think the two systems are conspiring 
to arbitrarily deactivate one of your threads for no reason? Nothing in what 
you've posted shows the likelihood of anything other than an application bug 
(as David K pointed out).

> 69% of all threads are sleeping on a monitor.

Fully expected, since that's what they do when waiting for work to show up.

> This might indicate they are waiting for some external 
> resource (e.g. database) which is overloaded or not 
> available

You don't need to speculate; the stack trace shows exactly what each thread is 
waiting on.

>     <Resource name="jdbc/xts"
>             auth="Container"
>             type="javax.sql.DataSource"
>             username="username
>             password="password"
>             driverClassName="oracle.jdbc.OracleDriver"
>             url="jdbc:oracle:thin:@localhost:1521:xe"
>             maxActive="20"
>             maxIdle="2"
>             minIdle="1"
>             initialSize="2"
>             />

Using removeAbandoned and logAbandoned might be of interest.

> I tried to use org.apache.tomcat.jdbc.pool.DataSourceFactory - 
> broadly same problem happens, but it gives up after 30 seconds
> saying "Pool empty. Unable to fetch a connection in 30 seconds,
> none available[20 in use]."

More evidence of a broken app, not returning connections to the pool when it's 
done with them.

 - 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: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to