tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Lucuk, Pete" <pete.lu...@ngc.com>
Subject RE: How to test connection pooling
Date Tue, 29 Nov 2005 19:22:09 GMT
I used Tomcat 4.1 and got the.....

	"create only one connection at first and then create more
connections as needed"

behavior and it works fine, no errors.

Also, I am using Oracle 8i and use the Oracle jdbc driver ojdbc14.jar
Different that commons stuff you are using.

>-----Original Message-----
>From: Manisha Sathe [mailto:manisha_msathe@yahoo.com] 
>Sent: Tuesday, November 29, 2005 1:44 PM
>To: Tomcat Users List
>Subject: RE: How to test connection pooling
>
>Hi, 
>
>After some testing on Tomcat 5 / Tomcat 4.1, i am finding some 
>strange behaviour.
>I could figure out how to check number of conections on MSSQL. 
>It is Enterprise Manager -> Management -> Current Processes - 
>u have to refresh it now and then.
>
>1)For Tomcat 5, it does create a pool of connections at start 
>depending on initial size. And it uses it from those depending 
>upon availability. I tested this using some big loops.
>
>2)But for Tomcat 4.1 - it does not create a pool of conections 
>but only ONE connection. I thought if trafic increases it 
>might add new connections to it.
>So again tested with 2 requests and used a big loop so that 
>first request will make use of connection object for 
>sufficient time and will not release it. 
>
>I was expecting second request should create new connection in 
>a pool, but it did not, it waited for existing connection to 
>become free and later it gave error saying:
>--------------------
>Error message
>
>java.sql.SQLException: SQLException from connection
>manager: org.apache.commons.dbcp.SQLNestedException:
>Cannot get a connection, pool exhausted, cause:
>Timeout waiting for idle object
>--------------------------
>
>
>Now whether it means that Tomcat 4.1 does not create pooling 
>at all ? Am i missing any settings ? For 4.1 am i suppose to 
>use any different jars ?
>
>I even tested the same for MySQL. The result is same.
>Pls Pls help me, i am stuck like anything.
>
>regards
>Manisha
>
>--- andy gordon <efhajg0@yahoo.com> wrote:
>
>> Show Processlist will show the number of initial connections 
>at start 
>> but does it show what subsystem a connection is bound to? what if 
>> there are multiple tomcat's connected to one database. How do you 
>> differentiate?
>> 
>> "Lucuk, Pete" <pete.lucuk@ngc.com> wrote:  Manisha,
>> 
>> I do not know how you check in MSSQL.
>> But, just an FYI....
>> 
>> If you setup your connection to ten, ten do not automatically get 
>> created, only one, and as your app requires more connections, more 
>> connections will be created up to a max of ten.
>> 
>> Took me a couple days to figure out that one
>> 
>> >-----Original Message-----
>> >From: Manisha Sathe
>> [mailto:manisha_msathe@yahoo.com]
>> >Sent: Tuesday, November 29, 2005 10:45 AM
>> >To: users@tomcat.apache.org
>> >Subject: How to test connection pooling
>> >
>> >I am on tomcat 4.1
>> >
>> >I am using JDBC connection pooling for MSSQL and
>> singleton
>> >class for JNDI lookup (only once) and get
>> connection.
>> >
>> >Everything is working file. But how to test that
>> connection
>> >pool for 10 (where initial size specified is 10)
>> has been created ?
>> >
>> >I know for mysql it is 'show processlist' and this
>> gives out
>> >initial number of connections at start. Same thing
>> how can i
>> >do it for mssql ?
>> >
>> >regards
>> >Manisha
>> >
>> >
>> >
>> >
>> >
>> > 
>> >__________________________________
>> >Start your day with Yahoo! - Make it your home
>> page! 
>> >http://www.yahoo.com/r/hs
>> >
>>
>>---------------------------------------------------------------------
>> >To unsubscribe, e-mail:
>> users-unsubscribe@tomcat.apache.org
>> >For additional commands, e-mail:
>> users-help@tomcat.apache.org
>> >
>> >
>> 
>>
>---------------------------------------------------------------------
>> To unsubscribe, e-mail:
>> users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail:
>> users-help@tomcat.apache.org
>> 
>> 
>> 
>> 
>> 		
>> ---------------------------------
>>  Yahoo! Music Unlimited - Access over 1 million songs. Try it free.
>
>
>
>		
>__________________________________
>Yahoo! Music Unlimited
>Access over 1 million songs. Try it free. 
>http://music.yahoo.com/unlimited/
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>For additional commands, e-mail: users-help@tomcat.apache.org
>
>

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


Mime
View raw message