Re: DBCP exception after Tomcat 10.1.13 -> 10.1.14 upgrade

2023-10-10 Thread Konstantin Kolinko
Hi! Thank you for the report. This issue is known and has already been fixed. See https://bz.apache.org/bugzilla/show_bug.cgi?id=67664 Best regards, Konstantin Kolinko вт, 10 окт. 2023 г. в 23:42, Michael Hayes : > > I have just upgraded a working Tomcat 10.1.13 installation to Tomcat 10.1.14,

Re: DBCP params different for the Tomcat JDBC (not DBCP) implementation in Tomcat 8?

2015-10-08 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Bradley, On 10/7/15 4:04 PM, Bradley Wagner wrote: >> The general recommendation is to use the default pool >> (commons-dbcp). > > Great. Thanks! > >> Unless you have narrowed a performance problem to the pool >> itself, > there's no reason to use

Re: DBCP params different for the Tomcat JDBC (not DBCP) implementation in Tomcat 8?

2015-10-07 Thread Bradley Wagner
> The general recommendation is to use the default pool (commons-dbcp). Great. Thanks! > Unless you have narrowed a performance problem to the pool itself, there's no reason to use one over the other. I suspect that there are only a few companies in the world where the connection pool implementat

Re: DBCP params different for the Tomcat JDBC (not DBCP) implementation in Tomcat 8?

2015-10-07 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Bradley, On 10/7/15 3:21 PM, Bradley Wagner wrote: > Ah, I see what you're saying. My apologies for not seeing that > sooner. > > That post was also very helpful in explaining why both exist. > Thank you! It's definitely confusing to those you don

Re: DBCP params different for the Tomcat JDBC (not DBCP) implementation in Tomcat 8?

2015-10-07 Thread Bradley Wagner
Ah, I see what you're saying. My apologies for not seeing that sooner. That post was also very helpful in explaining why both exist. Thank you! Is it your recommendation then to use DBCP 2 over Tomcat JDBC in Tomcat 8? If so, I think it would be helpful to have a page on the public Tomcat website

Re: DBCP params different for the Tomcat DBCP implementation in Tomcat 8?

2015-10-07 Thread Mark Thomas
On 07/10/2015 19:54, Bradley Wagner wrote: > Did not what? > > We added "factory='org.apache.tomcat.jdbc.pool.DataSourceFactory'". That > switched us to Tomcat DBCP, correct? No. There is no such thing as Tomcat DBCP. There is Apache Commons DBCP 1. This is used by default in Tomcat 6.0.x and 7.

Re: DBCP params different for the Tomcat DBCP implementation in Tomcat 8?

2015-10-07 Thread Bradley Wagner
Did not what? We added "factory='org.apache.tomcat.jdbc.pool.DataSourceFactory'". That switched us to Tomcat DBCP, correct? At that time, we were using the updated "maxWaitMillis" and "maxTotal" in our context.xml and Tomcat didn't seem to complain on startup. Then, when we tried to set "maxWait

Re: DBCP params different for the Tomcat DBCP implementation in Tomcat 8?

2015-10-07 Thread Konstantin Kolinko
2015-10-07 21:36 GMT+03:00 Bradley Wagner : > Hi, > > We recently upgraded to Tomcat 8. As per the Migration Guide: > https://tomcat.apache.org/migration-8.html#Database_Connection_Pooling and > DBCP documentation > https://tomcat.apache.org/tomcat-8.0-doc/jndi-datasource-examples-howto.html#Databa

Re: DBCP : Best practice javax.sql.DataSource object and Connection Object creation in Web Application

2014-01-01 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Milan, One followup (to your old thread) is sufficient. On 1/1/14, 7:50 AM, Milan wrote: > I would like to know that what is the best practice or efficient > way to create javax.sql.DataSource object > > A) Following is my practice. > > -

Re: DBCP is Single Threaded

2013-11-07 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Mark, On 11/7/13, 4:44 PM, Mark Thomas wrote: > On 07/11/2013 21:10, Christopher Schultz wrote: > >> Can you describe the effective difference between my >> over-simplified description and what is implemented in >> commons-pool (ignoring thread-fa

Re: DBCP is Single Threaded

2013-11-07 Thread Mark Thomas
On 07/11/2013 21:10, Christopher Schultz wrote: > Can you describe the effective difference between my > over-simplified description and what is implemented in commons-pool > (ignoring thread-fairness, which I'll admit is a very useful > feature)? For starters, the relatively expensive validation

Re: DBCP is Single Threaded

2013-11-07 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Mark, On 11/7/13, 11:14 AM, Mark Thomas wrote: > On 07/11/2013 16:03, Christopher Schultz wrote: >> Yogesh, >> >> On 11/7/13, 10:58 AM, yogesh hingmire wrote: >>> While looking to upgrade to tomcat7, i understand the >>> connection pool is a major

Re: DBCP is Single Threaded

2013-11-07 Thread Mark Thomas
On 07/11/2013 16:08, Christopher Schultz wrote: > Mark, > > On 11/7/13, 11:03 AM, Mark Thomas wrote: >> On 07/11/2013 15:58, yogesh hingmire wrote: >>> While looking to upgrade to tomcat7, i understand the >>> connection pool is a major improvement. I read that >>> >>> commons-dbcp is single thre

Re: DBCP is Single Threaded

2013-11-07 Thread Mark Thomas
On 07/11/2013 16:03, Christopher Schultz wrote: > Yogesh, > > On 11/7/13, 10:58 AM, yogesh hingmire wrote: >> While looking to upgrade to tomcat7, i understand the connection >> pool is a major improvement. I read that > >> commons-dbcp is single threaded, in order to be thread safe >> commons-

Re: DBCP is Single Threaded

2013-11-07 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Mark, On 11/7/13, 11:03 AM, Mark Thomas wrote: > On 07/11/2013 15:58, yogesh hingmire wrote: >> While looking to upgrade to tomcat7, i understand the connection >> pool is a major improvement. I read that >> >> commons-dbcp is single threaded, in o

Re: DBCP is Single Threaded

2013-11-07 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Yogesh, On 11/7/13, 10:58 AM, yogesh hingmire wrote: > While looking to upgrade to tomcat7, i understand the connection > pool is a major improvement. I read that > > commons-dbcp is single threaded, in order to be thread safe > commons-dbcp locks

Re: DBCP is Single Threaded

2013-11-07 Thread Mark Thomas
On 07/11/2013 15:58, yogesh hingmire wrote: > While looking to upgrade to tomcat7, i understand the connection pool is a > major improvement. I read that > > commons-dbcp is single threaded, in order to be thread safe commons-dbcp > locks the entire pool, even during query validation. Where did y

Re: dbcp datasource encryption

2012-04-23 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Filip, On 4/23/12 1:47 PM, Filip Hanik Mailing Lists wrote: >> http://wiki.apache.org/tomcat/FAQ/Password >> >> >> In short, no. >> >> Encrypting your database, database user, and database password >> buys you virtually (and most people would say a

Re: dbcp datasource encryption

2012-04-23 Thread Filip Hanik Mailing Lists
- Original Message - > > http://wiki.apache.org/tomcat/FAQ/Password > > > In short, no. > > Encrypting your database, database user, and database password buys > you virtually (and most people would say actually) nothing. "virtually nothing" is the opposite of what I would call it.

Re: dbcp datasource encryption

2012-04-19 Thread Mark Eggers
- Original Message - > From: 이재만 > To: Tomcat Users List > Cc: > Sent: Thursday, April 19, 2012 4:37 PM > Subject: Re: dbcp datasource encryption > >t hanks.. > > > > i want to encrypt password and database in my <Resource> element. > &g

Re: dbcp datasource encryption

2012-04-19 Thread 이재만
>; Cc: Sent: 2012-04-20 (금) 01:14:54 Subject: Re: dbcp datasource encryption -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 이재만, On 4/19/12 2:07 AM, 이재만 wrote: > i am operating website on tomcat6 and tomcat7 > > and i used dbcp as datasource on tomcat7 so i want to encrypt d

Re: dbcp datasource encryption

2012-04-19 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 이재만, On 4/19/12 2:07 AM, 이재만 wrote: > i am operating website on tomcat6 and tomcat7 > > and i used dbcp as datasource on tomcat7 so i want to encrypt dbcp > datasource > > how do i encrypt my dbcp datasource .. plase give me some > samples.. thanks

RE: dbcp datasource encryption

2012-04-19 Thread Osipov, Michael
이재만 wrote: > and i used dbcp as datasource on tomcat7 so i want to encrypt dbcp > datasource > > how do i encrypt my dbcp datasource .. plase give me some samples.. > thanks. This should probably go to the DBCP pool but you should evaluate SSL with your database. With best regards, Michael O

Re: DBCP Connections build up on one server

2012-02-18 Thread Pid *
On 17 Feb 2012, at 22:02, Shanti Suresh wrote: > The threaddump look the same across both servers. The heapdump shows > increasing heap on the suspect server in the Finalizer class. The Finalizer > class is holding references to another class which is a wrapper class for > ConectionPool obje

Re: DBCP Connections build up on one server

2012-02-17 Thread Shanti Suresh
The threaddump look the same across both servers. The heapdump shows increasing heap on the suspect server in the Finalizer class. The Finalizer class is holding references to another class which is a wrapper class for ConectionPool objects. Thanks for all tips/suggestions!

Re: dbcp is mixing up connections

2011-12-16 Thread Terence M. Bandoian
On 1:59 PM, Pid * wrote: > On 16 Dec 2011, at 09:32, "Aitor Garcia | Tempel.es" > wrote: > > Mark: > > I'm just declaring variables there, no putting logic. > > You had overlooked log4jdbc, if you have read books in the same way > > Library log4jdbc is COOL! Works very Well, is really a good

Re: dbcp is mixing up connections

2011-12-16 Thread Pid *
On 16 Dec 2011, at 09:32, "Aitor Garcia | Tempel.es" wrote: Mark: I'm just declaring variables there, no putting logic. You had overlooked log4jdbc, if you have read books in the same way Library log4jdbc is COOL! Works very Well, is really a good library that helps me a lot, without it I

Re: dbcp is mixing up connections

2011-12-16 Thread Aitor Garcia | Tempel.es
Mark: I'm just declaring variables there, no putting logic. You had overlooked log4jdbc, if you have read books in the same way Library log4jdbc is COOL! Works very Well, is really a good

Re: dbcp is mixing up connections

2011-12-15 Thread Mark Eggers
- Original Message - > From: Terence M. Bandoian > To: Tomcat Users List > Cc: > Sent: Thursday, December 15, 2011 11:31 AM > Subject: Re: dbcp is mixing up connections > > On 1:59 PM, Christopher Schultz wrote: >> Aitor, >> >> On 12/15/11

Re: dbcp is mixing up connections

2011-12-15 Thread Konstantin Kolinko
2011/12/15 Aitor Garcia | Tempel.es > > I had read all the JNDI & JDBC Official & Unofficial documentation but & only > found than you MUST close the connections. That is why you have to read the Servlet specification, JSP specification, etc. > There insn't references to where to declare var

Re: dbcp is mixing up connections

2011-12-15 Thread Terence M. Bandoian
On 1:59 PM, Christopher Schultz wrote: > Aitor, > > On 12/15/11 7:12 AM, Aitor Garcia | Tempel.es wrote: > > 5) Tomcat, creates ONE (or maybe SOME) Class object and call to the > > _jspService on every script request > > > What happens if you handle Pool Coonections with a > > 'java.sql.Connection

Re: dbcp is mixing up connections

2011-12-15 Thread Terence M. Bandoian
On 1:59 PM, Christopher Schultz wrote: > Aitor, > > On 12/15/11 7:12 AM, Aitor Garcia | Tempel.es wrote: > > 5) Tomcat, creates ONE (or maybe SOME) Class object and call to the > > _jspService on every script request > > > What happens if you handle Pool Coonections with a > > 'java.sql.Connectio

Re: dbcp is mixing up connections

2011-12-15 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Aitor, On 12/15/11 7:12 AM, Aitor Garcia | Tempel.es wrote: > 5) Tomcat, creates ONE (or maybe SOME) Class object and call to the > _jspService on every script request > > What happens if you handle Pool Coonections with a > 'java.sql.Connection con

Re: dbcp is mixing up connections

2011-12-15 Thread Pid
On 15/12/2011 12:55, Aitor Garcia | Tempel.es wrote: > I had read all the JNDI & JDBC Official & Unofficial documentation but & > only found than you MUST close the connections. > > There insn't references to where to declare variables. > > Declaring into local scope forces that you have pass by

Re: dbcp is mixing up connections

2011-12-15 Thread Aitor Garcia | Tempel.es
I had read all the JNDI & JDBC Official & Unofficial documentation but & only found than you MUST close the connections. There insn't references to where to declare variables. Declaring into local scope forces that you have pass by

Re: dbcp is mixing up connections

2011-12-15 Thread Mark Thomas
On 15/12/2011 12:12, Aitor Garcia | Tempel.es wrote: > I don't know if this is a tomcat bug. This is clearly not a Tomcat bug. This comes under the category of "user error". Mark - To unsubscribe, e-mail: users-unsubscr...@tomca

Re: DBCP deadlock similar to DBCP-270

2011-08-31 Thread Mark Thomas
On 31/08/2011 07:54, Neil Laurance wrote: > Hi there, > > We are using: > > Red Hat Enterprise Linux Server release 5.4 (Tikanga) > > Tomcat 6.0.29 > > We appear to be having a similar issue to: > > https://issues.apache.org/jira/browse/DBCP-270 > > Except our stacktrace line-numbers are diff

Re: DBCP deadlock similar to DBCP-270

2011-08-31 Thread Konstantin Kolinko
2011/8/31 Neil Laurance : > Hi there, > > We are using: > > Red Hat Enterprise Linux Server release 5.4 (Tikanga) > > Tomcat 6.0.29 > > (...) > > Is there any easy of confirming the version of dbcp we have? I exploded >  tomcat-dbcp.jar and took a look, and nothing obvious ? apache-tomcat-6.0.x-sr

Re: dbcp with embedded tomcat7

2011-02-07 Thread Konstantin Kolinko
2011/2/7 Holger Veltrup : >  InitialContext ic = new InitialContext(); In short: 1) InitialContext depends on classloader: the context you created here and the one that your webapp will create with "new InitialContext()" are different. 2) Usually binding a pool after tomcat.start() will be too la

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

Re: DBCP connections not in accordance with netstat output

2010-10-20 Thread Phil Steitz
On 10/20/10 5:32 AM, Felix Schumacher wrote: Hi Marc, Am Mittwoch, den 20.10.2010, 00:54 +0200 schrieb Marc Wilmots: Hi List, I installed Lambda Probe to debug a problem that I'm having with a Liferay portal (5.1.2): Tomcat: 6.0.26 with dbcp JDK: 1.6.0_18 DB: Oracle 10.2.0.4 (ojdbc14) RHEL 5.

Re: DBCP connections not in accordance with netstat output

2010-10-20 Thread Felix Schumacher
Hi Marc, Am Mittwoch, den 20.10.2010, 00:54 +0200 schrieb Marc Wilmots: > Hi List, > > I installed Lambda Probe to debug a problem that I'm having with a Liferay > portal (5.1.2): > > Tomcat: 6.0.26 with dbcp > JDK: 1.6.0_18 > DB: Oracle 10.2.0.4 (ojdbc14) > RHEL 5.4 64Bits > > When launching a

Re: DBCP woes (running out of cursors).

2009-10-28 Thread Elli Albek
Hi, >From what I can remember, which has been a long time ago, requests are being handled by servlets after the shutdown process has started and the pool was closed. I would imagine that this is a violation of the spec as well, but I am not sure. You would imagine that JNDI resources should be avai

Re: DBCP woes (running out of cursors).

2009-10-28 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Elli, On 10/28/2009 12:21 AM, Elli Albek wrote: > In terms of listeners, I saw that Tomcat executes requests while in > the closing process. That's a problem. What kind of listener are you using? >> My understanding was that: >> >> 1. Tomcat does no

Re: DBCP woes (running out of cursors).

2009-10-27 Thread Elli Albek
Thanks for your replies. I agree that Tomcat should be responsible for all objects that are configured in Tomcat, and the web app should be responsible for objects that are created by the webapp. Currently it does not happen properly in tomcat. This is not related to DBCP code, it is all Tomcat cod

Re: DBCP woes (running out of cursors).

2009-10-27 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Elli, On 10/26/2009 10:59 PM, Elli Albek wrote: > To disable caching in DBCP, use configuration option: > poolPreparedStatements=false Note that this is the default. Presumably, if you don't know if your prepared statements are being cached, then the

Re: DBCP woes (running out of cursors).

2009-10-27 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Elli, On 10/26/2009 9:01 PM, Elli Albek wrote: > 2. If your JDBC driver supports caching of prepared statements and > metadata, do it in the driver and disable this in DBCP. IMO DBCP > does a poor job at best in caching. We use mysql and its JDBC dri

Re: DBCP woes (running out of cursors).

2009-10-27 Thread Bill Davidson
Elli Albek wrote: >2. If your JDBC driver supports caching of prepared statements and >metadata, do it in the driver and disable this in DBCP. IMO DBCP does >a poor job at best in caching. We use mysql and its JDBC driver is >doing an excellent job. It didn't occur to me that that was available.

Re: DBCP woes (running out of cursors).

2009-10-26 Thread Elli Albek
Hi, More information about tomcat shutdown and object swapping probably belongs in the development list. It is quite a bit of work to extend DBCP and write extensions to tomcat, and at the end of the day most of those problems I would consider as bugs. DBCP specifically cannot be easily extended, w

RE: DBCP woes (running out of cursors).

2009-10-26 Thread Martin Gainty
mg>good work > From: e...@sustainlane.com > To: users@tomcat.apache.org > > Hi, > I did not follow this thread form the beginning, but I can provide a > few tips about using connection pools in tomcat. > 1. DBCP has quite a few problems in the area of scalability. We have > our own modified vers

Re: DBCP woes (running out of cursors).

2009-10-26 Thread Elli Albek
Hi, I did not follow this thread form the beginning, but I can provide a few tips about using connection pools in tomcat. 1. DBCP has quite a few problems in the area of scalability. We have our own modified version of the source that makes it more concurrent, and I believe some of those changes we

Re: DBCP woes (running out of cursors).

2009-10-26 Thread Mark Thomas
Bill Davidson wrote: > Christopher Schultz wrote: >>When you've played with it for a bit, tell us how things turned out. > > It's looking like optimal is caching about 40 PreparedStatement objects. > However, I should qualify that noting that it's with our application and > specifically with our l

Re: DBCP woes (running out of cursors).

2009-10-26 Thread Bill Davidson
Christopher Schultz wrote: >When you've played with it for a bit, tell us how things turned out. It's looking like optimal is caching about 40 PreparedStatement objects. However, I should qualify that noting that it's with our application and specifically with our little pummeling benchmark, whic

Re: DBCP woes (running out of cursors).

2009-10-23 Thread Bill Davidson
I already got a response to the ehancement request. Apparently the documentation will be changed to this: Make sure your connection has some resources left for the other statements. Pooling PreparedStatements may keep their cursors open in the database, causing a connection to run out

Re: DBCP woes (running out of cursors).

2009-10-22 Thread Bill Davidson
Christopher Schultz wrote: >I see you've cross-posted to commons-user. That's good, but you probably >want to file an actually bug report / enhancement request for the >documentation. Filed. Key: DBCP-301 - To unsubscribe, e-

Re: DBCP woes (running out of cursors).

2009-10-19 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Bill, On 10/19/2009 3:14 PM, Bill Davidson wrote: > Christopher Schultz wrote: >> I'm curious about the usefulness of caching prepared statements in >> general, though. What is the default maxOpenPreparedStatements setting >> and what did you set it t

Re: DBCP woes (running out of cursors).

2009-10-19 Thread Bill Davidson
Christopher Schultz wrote: I'm curious about the usefulness of caching prepared statements in general, though. What is the default maxOpenPreparedStatements setting and what did you set it to in order to get it to work out well for you? The default is unlimited, which is the problem. I've b

Re: DBCP woes (running out of cursors).

2009-10-19 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Bill, On 10/16/2009 5:36 PM, Bill Davidson wrote: > Bill Davidson wrote: >>Could maxOpenPreparedStatements possibly fix this? > > Apparently it does. Glad to get the bottom of this problem, though I'm not entirely sure where it leaves you. > The DB

Re: DBCP woes (running out of cursors).

2009-10-16 Thread Bill Davidson
Bill Davidson wrote: >Could maxOpenPreparedStatements possibly fix this? Apparently it does. The DBCP config docs need a better warning on poolPreparedStatements: "*NOTE* - Make sure your connection has some resources left for the other statements." just doesn't quite cut it. Something more

Re: DBCP woes (running out of cursors).

2009-10-16 Thread Bill Davidson
Just thinking about this some more So apparently, when I was using poolPreparedStatements="true", and I did conn.prepareStatement(SomeSQLString), I was getting back a Statement object created by DBCP to be pooled. When I called close() on that statement, it did not really close(), which was

Re: DBCP woes (running out of cursors).

2009-10-16 Thread Bill Davidson
Christopher Schultz wrote: >Uh, oh. Are you doing something like this: Possibly. I didn't write that code. >If you're doing that, then you're probably making a big mistake. Are you >storing connections in sessions or anything like that? Yuk. For certain transactional operations, I think it is.

Re: DBCP woes (running out of cursors).

2009-10-16 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Bill, (I've decided to stop cross-posting to commons-user. If you want to forward come of my comments, you are welcome to do so). On 10/15/2009 5:07 PM, Bill Davidson wrote: > I'm a little confused about auto-commit. I don't want my transactions > a

Re: DBCP woes (running out of cursors).

2009-10-15 Thread Bill Davidson
Christopher Schultz wrote: >Probably not. DBCP calls setAutoCommit(true) by default in order to >reset the connection as it goes back into the pool. Any pending >transaction is committed (!) when that happens, so there shouldn't be >any in-progress transactions lingering around. > >If you set auto

Re: DBCP woes (running out of cursors).

2009-10-15 Thread Hassan Schroeder
On Thu, Oct 15, 2009 at 1:46 PM, Christopher Schultz wrote: > You could also ask on some Java-oriented Oracle forums. Oracle has a user community called Mix -- https://mix.oracle.com/ -- where you could post your issue (requires registration but otherwise free). /* It's JRuby on Rails but not,

Re: DBCP woes (running out of cursors).

2009-10-15 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Bill, On 10/15/2009 2:24 PM, Bill Davidson wrote: > That does make me wonder though if there are Connection's getting sent > back to the pool that had a pending transaction without a commit/rollback > and if that could be making any cursors on that co

Re: DBCP woes (running out of cursors).

2009-10-15 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Bill, On 10/15/2009 2:15 PM, Bill Davidson wrote: > Christopher Schultz wrote: >>Is it possible that your server just doesn't want to allocate 245 * 4 >>cursors, and that you are just hitting that barrier? > > cursor != connection Right... but presu

Re: DBCP woes (running out of cursors).

2009-10-15 Thread Bill Davidson
Martin Gainty wrote: >are you running as a Transaction? In some cases, but a lot of these lingering cursors are on very simple queries, with no insert/update/delete involved. As I said before, I'm finding lingering cursors on things as simple as "SELECT * FROM some_table WHERE id = ?". That doe

Re: DBCP woes (running out of cursors).

2009-10-15 Thread Bill Davidson
Christopher Schultz wrote: >Is it possible that your server just doesn't want to allocate 245 * 4 >cursors, and that you are just hitting that barrier? cursor != connection Oracle is set up to allow up to 300 cursors per session (connection). I could up that limit, but it probably won't fix the

RE: DBCP woes (running out of cursors).

2009-10-14 Thread Martin Gainty
les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni. > Date: Wed, 14 Oct 2009 21:22:35 -0400 > From: ch...@christopherschultz.net > To: users@tomcat.apache.org > CC: u...@commons.apache.org > Subject: Re: D

Re: DBCP woes (running out of cursors).

2009-10-14 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Bill, On 10/14/2009 5:05 PM, Bill Davidson wrote: > Usually, we don't need that many [connections], but sometimes, we get hit > really hard > with a lot of traffic and do need that many. BTW, this is load balanced > across 4 servers that can each do

  1   2   3   >