aspose file tools*
The moose likes JDBC and the fly likes connection pooling Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "connection pooling" Watch "connection pooling" New topic
Author

connection pooling

Abhishek Reddy
Ranch Hand

Joined: Mar 28, 2006
Posts: 259
What is the difference between, "maxIdle", "maxWait" and "maxActive"?
I have read through the comments given from the Tomcat website, but i
still don't quite understand what it mean.

For example:
I placed my "maxActive" to 130
I placed my "maxWait" to 1000
and my "maxIdle" to 30000
how will the connection be like?

Database used racle 9i
Tomcat server version 5.5
JDBC Driver : Jdbc odbc type 1 driver

Also tell me how to set these values?


Abhishek
Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336

maxActive - defines the maximum number of active connections the pool can contain. This is basically the absolute limit of the number of connections your pool is allowed to make to the database.

maxIdle - defines the maximum number of idle connections that can exist in the pool.

maxWait - how long a client can wait for a connection to become available before throwing an exception.

How you set these value depends on the load on yuor application. The best thing to do is make a guess, run some performance tests and tune accordingly.


JDBC Driver : Jdbc odbc type 1 driver

Why are you using this with Oracle? Typically you would only use the JDBC-ODBC bridge where no alternative exists.


JavaRanch FAQ HowToAskQuestionsOnJavaRanch
Abhishek Reddy
Ranch Hand

Joined: Mar 28, 2006
Posts: 259
thanks for the reply....

maxIdle - defines the maximum number of idle connections that can exist in the pool.

It means maxActive value should be less than maxActive value..

here in the application i have given both maxActive and maxIdle value to 140 and maxWait to 10,000.

when performance testing is done, the folowing error has occurred..

java.sql.SQLException: [Oracle][ODBC][Ora]ORA-00020: maximum number of processes (150) exceeded.

How do i solve this problem?
srinivas neeluri
Greenhorn

Joined: Jan 23, 2008
Posts: 2
Originally posted by Abhishek Reddy Chepyala:
thanks for the reply....

maxIdle - defines the maximum number of idle connections that can exist in the pool.

It means maxActive value should be less than maxActive value..

here in the application i have given both maxActive and maxIdle value to 140 and maxWait to 10,000.

when performance testing is done, the folowing error has occurred..

java.sql.SQLException: [Oracle][ODBC][Ora]ORA-00020: maximum number of processes (150) exceeded.

How do i solve this problem?


SORRY I DONT KNOW ......
Abhishek Reddy
Ranch Hand

Joined: Mar 28, 2006
Posts: 259
thanks for the reply....

maxIdle - defines the maximum number of idle connections that can exist in the pool.

It means maxIdle value should be less than maxActive value..

here in the application i have given both maxActive and maxIdle value to 140 and maxWait to 10,000.

when performance testing is done, the folowing error has occurred..

java.sql.SQLException: [Oracle][ODBC][Ora]ORA-00020: maximum number of processes (150) exceeded.

How do i solve this problem?
Roger Chung-Wee
Ranch Hand

Joined: Sep 29, 2002
Posts: 1683
This is not a new problem, you reported this in another post.

Are you failing to close a Connection after usage?


SCJP 1.4, SCWCD 1.3, SCBCD 1.3
Abhishek Reddy
Ranch Hand

Joined: Mar 28, 2006
Posts: 259
i have checked 4 to 5 times, there is no connection leakage problem.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: connection pooling