commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sheng Huang <SHu...@tlg.ca>
Subject Re: [dbcp] How could I find out the application methods that hold the active connections?
Date Mon, 12 Apr 2004 17:46:38 GMT
Hi Dirk,

Thank you very much for your reply. Now I understand the connections closed
in my configuration are active connections instead of inactive connections.
Although I see a lot of "DBCP object created was never
closed" followed by "Already closed" as I said in my first email, all
connections will become active after the application is used for some time
and then the application stalls (wait unlimited for available connections).

There may be some defects in my code, thus the stacktrace for DBCP object
creation will be very helpful to me. Since I just installed Tomcat 4.1.18
with the default configuration (standalone Tomcat instead of Tomcat and
Apache), I can't see the stderr messages logged somewhere and don't know how
to set it up. Could you give me some information on how to setup stderr
logging or redirect them to the standard catalina.out? Thank you very much.

Best regards,
Sheng
  

>When you get a "DBCP object created..." message then there should also be a
stacktrace be written. With version 1.1 the message goes to stdout and the
stacktrace to stderr. In the nightly builds they go both go to stderr.

>The stacktrace displays the location where is abandoned connection was
borrowed.


>The removeAbandoned parameter is for removing the active connections.
>Idle connections are removed with "minEvictableIdleTimeMillis".

>-- Dirk


Sheng Huang wrote:


I have an application running on Tomcat 4.1.18 with dbcp. My configuration
parameters is as follows:
maxActive 4
maxIdle 2
maxWait -1 removeAbandoned 60
logAbandoned true

When I deployed it on a slow machine, a lot of times it will display
We have a connection pool and it has 4 max active connections.
We have a connection pool and it has 2 max idle connections.
We have a connection pool and it has 4 active connections.
We have a connection pool and it has 0 idle connections.
Then the application just stalls since no more new connections can be made
(maxActive=active). I checked the log and saw a lot of "DBCP object created
2004-03-22 12:43:32 by the following code was never
closed" followed by "Already closed". I guess there are some inactive
connections are recycled.
Is there a way that I can find out which application methods are holding
these active connections? Should these active connections also have a
timeout value? Thank you very much.
Best regards,
Sheng 

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Mime
View raw message