Re: DBCP abandoned trace - unable to understand the leak

2010-11-10 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Pid, On 11/10/2010 3:51 AM, Pid wrote: > finally { > DB.close(rs); > DB.close(ps); > DB.close(cn); > } I've gone further in our code: DB.close(cn, ps, rs); - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (MingW32) Comment: Using

Re: DBCP abandoned trace - unable to understand the leak

2010-11-10 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Sasidhar, On 11/10/2010 3:29 AM, sasidhar prabhakar wrote: > Sorry for that. I changed it 300 seconds. Perhaps you could post your entire configuration. It stops us from asking too many questions, and generally gets right to the problem. - -chris --

Re: DBCP abandoned trace - unable to understand the leak

2010-11-10 Thread sasidhar prabhakar
When I get this problem, I tried the query in DB manually by this query *select count(*) from v$process;* * * The count some times very less, like if total connections are 200 it shows * * some times 60,40,162 like this. On Wed, Nov 10, 2010 at 3:20 AM, Mark Thomas wrote: > On 10/11/2010 09:02

Re: DBCP abandoned trace - unable to understand the leak

2010-11-10 Thread sasidhar prabhakar
On Wed, Nov 10, 2010 at 3:02 AM, Pid wrote: > On 04/11/2010 12:04, sasidhar prabhakar wrote: > > dataSource = ConnectionUtil.getDataSource(); > > } > > Is the class you posted the only DAO? Could the leak be from another > class? > Some other DAOs are there. Which takes more than removeAbandone

Re: DBCP abandoned trace - unable to understand the leak

2010-11-10 Thread Pid
On 04/11/2010 12:04, sasidhar prabhakar wrote: > dataSource = ConnectionUtil.getDataSource(); > } Is the class you posted the only DAO? Could the leak be from another class? Can you post ConnectionUtil.java? p 0x62590808.asc Description: application/pgp-keys signature.asc Description: Ope

Re: DBCP abandoned trace - unable to understand the leak

2010-11-10 Thread Pid
On 04/11/2010 07:50, sasidhar prabhakar wrote: > We are using struts and following DAO pattern. > > This is the code > > > public String getCountryName(long ipSum){ > String name = null; >Connection connection = null; >PreparedStatement pstmt = null; >ResultSet rs

Re: DBCP abandoned trace - unable to understand the leak

2010-11-10 Thread Mark Thomas
On 10/11/2010 09:02, Pid wrote: > On 04/11/2010 12:04, sasidhar prabhakar wrote: >> dataSource = ConnectionUtil.getDataSource(); >> } > > Is the class you posted the only DAO? Could the leak be from another class? > > Can you post ConnectionUtil.java? Given the SQL seen so far and that some que

Re: DBCP abandoned trace - unable to understand the leak

2010-11-10 Thread Pid
On 10/11/2010 09:41, sasidhar prabhakar wrote: > private static DataSource dataSource; > Getting the DataSource shouldn't be an expensive operation, so 'optimising' by retaining a static reference to it doesn't make much sense. Try just getting a fresh DataSource every time - your DB queries are

Re: DBCP abandoned trace - unable to understand the leak

2010-11-10 Thread Pid
On 04/11/2010 15:41, Mikolaj Rydzewski wrote: > > On Thu, 4 Nov 2010 10:37:25 -0500, "Propes, Barry L " > wrote: >> Not sure if it matters or not, but in your SponserSummaryDAO >> method, it appears you establish the rs as null, but don't ever close >> it? You might specifically try that. >> >>

Re: [OT] Re: DBCP abandoned trace - unable to understand the leak

2010-11-10 Thread Pid
On 04/11/2010 11:09, Peter Crowther wrote: > On 4 November 2010 10:54, Mark Thomas wrote: > >> On 04/11/2010 05:01, sasidhar prabhakar wrote: >>> I have one doubt. >> You have a question not a doubt > > I see this on many forums, and have come to realise it's associated with > speakers of at leas

Re: DBCP abandoned trace - unable to understand the leak

2010-11-10 Thread Pid
On 10/11/2010 08:29, sasidhar prabhakar wrote: > Sorry for that. I changed it 300 seconds. OK >> What else did you change? [hint hint] p 0x62590808.asc Description: application/pgp-keys signature.asc Description: OpenPGP digital signature

Re: DBCP abandoned trace - unable to understand the leak

2010-11-10 Thread sasidhar prabhakar
Sorry for that. I changed it 300 seconds. On Wed, Nov 10, 2010 at 2:12 AM, Pid wrote: > On 10/11/2010 06:51, sasidhar prabhakar wrote: > > After changing time out value now I am getting this problem > > > > org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot get a connection, > > pool error T

Re: DBCP abandoned trace - unable to understand the leak

2010-11-10 Thread Pid
On 10/11/2010 06:51, sasidhar prabhakar wrote: > After changing time out value now I am getting this problem > > org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot get a connection, > pool error Timeout waiting for idle object Shall we guess what you set it to? My guess is "7". Am I right?

Re: DBCP abandoned trace - unable to understand the leak

2010-11-09 Thread sasidhar prabhakar
After changing time out value now I am getting this problem org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot get a connection, pool error Timeout waiting for idle object On Tue, Nov 9, 2010 at 5:22 PM, Christopher Schultz < ch...@christopherschultz.net> wrote: > -BEGIN PGP SIGNED M

Re: DBCP abandoned trace - unable to understand the leak

2010-11-09 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Sasidhar, On 11/8/2010 12:31 AM, sasidhar prabhakar wrote: > On Thu, Nov 4, 2010 at 9:10 PM, Christopher Schultz < > ch...@christopherschultz.net> wrote: >> >> I have found that these exceptions can occur even when there is no leak. >> >> Specifically

Re: DBCP abandoned trace - unable to understand the leak

2010-11-07 Thread sasidhar prabhakar
On Thu, Nov 4, 2010 at 9:10 PM, Christopher Schultz < ch...@christopherschultz.net> wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > Sasidhar, > > On 11/4/2010 8:34 AM, sasidhar prabhakar wrote: > > The class is fine but in log it is showing this one. Here everything > closed > > fine.

RE: DBCP abandoned trace - unable to understand the leak

2010-11-04 Thread Mikolaj Rydzewski
On Thu, 4 Nov 2010 10:37:25 -0500, "Propes, Barry L " wrote: Not sure if it matters or not, but in your SponserSummaryDAO method, it appears you establish the rs as null, but don't ever close it? You might specifically try that. And is it necessary to reassign all those variables (connectio

Re: DBCP abandoned trace - unable to understand the leak

2010-11-04 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Sasidhar, On 11/4/2010 8:34 AM, sasidhar prabhakar wrote: > The class is fine but in log it is showing this one. Here everything closed > fine. > Then why it is showing like this > > DBCP object created 2010-11-04 11:07:59 by the following code was n

RE: DBCP abandoned trace - unable to understand the leak

2010-11-04 Thread Propes, Barry L
locks? -Original Message- From: sasidhar prabhakar [mailto:sasidhar1...@gmail.com] Sent: Thursday, November 04, 2010 7:05 AM To: Tomcat Users List Subject: Re: DBCP abandoned trace - unable to understand the leak * * @author oracle */ public class SponserSummaryDAO { ... public SponserSumma

RE: DBCP abandoned trace - unable to understand the leak

2010-11-04 Thread Rob Gregory
il.com] > Sent: 04 November 2010 12:35 > To: Tomcat Users List > Subject: Re: DBCP abandoned trace - unable to understand the leak > > The class is fine but in log it is showing this one. Here everything closed > fine. > Then why it is showing like this > > DBCP object c

Re: DBCP abandoned trace - unable to understand the leak

2010-11-04 Thread sasidhar prabhakar
The class is fine but in log it is showing this one. Here everything closed fine. Then why it is showing like this DBCP object created 2010-11-04 11:07:59 by the following code was never closed: java.lang.Exception at org.apache.tomcat.dbcp.dbcp.AbandonedTrace.setStackTrace(AbandonedTrace.java:160

RE: DBCP abandoned trace - unable to understand the leak

2010-11-04 Thread Rob Gregory
The full class looks ok to me. Your issues must be elsewhere. > -Original Message- > From: sasidhar prabhakar [mailto:sasidhar1...@gmail.com] > Sent: 04 November 2010 12:05 > To: Tomcat Users List > Subject: Re: DBCP abandoned trace - unable to understand the leak > &g

Re: DBCP abandoned trace - unable to understand the leak

2010-11-04 Thread sasidhar prabhakar
The complete class has only two methods. And class is import connection.ConnectionUtil; import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; import java.util.Calendar; import javax.sql.DataSource; import org.apache.commons.logging

RE: DBCP abandoned trace - unable to understand the leak

2010-11-04 Thread Rob Gregory
The code you posted looks fine but without the complete class it is hard to say 100% your class is fine. > -Original Message- > From: sasidhar prabhakar [mailto:sasidhar1...@gmail.com] > Sent: 04 November 2010 11:36 > To: Tomcat Users List > Subject: Re: DBCP abandoned tr

Re: DBCP abandoned trace - unable to understand the leak

2010-11-04 Thread sasidhar prabhakar
On Thu, Nov 4, 2010 at 4:24 PM, Mark Thomas wrote: > On 04/11/2010 05:01, sasidhar prabhakar wrote: > > Is abandoned trace really shows the code where the > > connection established and did not close it. > >>Yes. > The code I posted above is clean and properly closed all of resources. Is t

[OT] Re: DBCP abandoned trace - unable to understand the leak

2010-11-04 Thread Peter Crowther
On 4 November 2010 10:54, Mark Thomas wrote: > On 04/11/2010 05:01, sasidhar prabhakar wrote: > > I have one doubt. > You have a question not a doubt > > I see this on many forums, and have come to realise it's associated with speakers of at least one of the widely-used languages in India. I've

Re: DBCP abandoned trace - unable to understand the leak

2010-11-04 Thread Mark Thomas
On 04/11/2010 05:01, sasidhar prabhakar wrote: > Yes it is. > > I have one doubt. You have a question not a doubt and you have more than one of them. > Is abandoned trace really shows the code where the > connection established and did not close it. Yes. > Is remove abandoned, will close the con

Re: DBCP abandoned trace - unable to understand the leak

2010-11-04 Thread sasidhar prabhakar
Yes it is. I have one doubt. Is abandoned trace really shows the code where the connection established and did not close it. Is remove abandoned, will close the connection after time out and places it back to pool. Is it really closes the connection? for example I configured pool with 200 connec

Re: DBCP abandoned trace - unable to understand the leak

2010-11-04 Thread Mikolaj Rydzewski
On Thu, 4 Nov 2010 13:20:48 +0530, sasidhar prabhakar wrote: We are using struts and following DAO pattern. Looks fine. Does the problem occur everytime? -- Mikolaj Rydzewski - To unsubscribe, e-mail: users-unsubscr...@to

Re: DBCP abandoned trace - unable to understand the leak

2010-11-04 Thread sasidhar prabhakar
We are using struts and following DAO pattern. This is the code public String getCountryName(long ipSum){ String name = null; Connection connection = null; PreparedStatement pstmt = null; ResultSet rs = null; try{ connection = dataSource.getConne

Re: DBCP abandoned trace - unable to understand the leak

2010-11-04 Thread Mikolaj Rydzewski
On Thu, 4 Nov 2010 11:08:07 +0530, sasidhar prabhakar wrote: I didn't understand below, in DAO class everything fine. Connection,PreparedStatement,ResultSet are all declared method local, and closed properly. Within finally clause? Please guide me to solve the problem. Please show us