File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JDBC and Relational Databases and the fly likes ORA-00020: maximum number of processes (59) exceeded Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "ORA-00020: maximum number of processes (59) exceeded" Watch "ORA-00020: maximum number of processes (59) exceeded" New topic

ORA-00020: maximum number of processes (59) exceeded

Tausif Khanooni
Ranch Hand

Joined: Nov 14, 2002
Posts: 107
Hi guys!!
I have written DBConnectionPool class, which keeps only 3 database connection instance. but apart from this I am using sqlloader to load the
data into database from flat file.
I am getting this error quite often.
java.sql.SQLException: ORA-00020: maximum number of processes (59) exceeded
can any one please help me to get rid of it ??
thnx in advance

"Walking on water and building IT Architecture from <br />specification are easy if and only if both are frozen"
Lasse Koskela

Joined: Jan 23, 2002
Posts: 11962
Without much knowledge about Oracle specifics, I'd say you have two options:
1) increase the number of processes available for the Oracle driver/server on the OS level, or
2) limit the number of simultaneous database accesses with some custom pooling framework.
Needless to say, option 1 would seem more appropriate and safe alternative. But, as I said, I'm no expert with Oracle...

Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]
Peter den Haan
Ranch Hand

Joined: Apr 20, 2000
Posts: 3252
The most probable cause is that you are leaking connections. Unless this is an educational exercise, I should really ask what reason on Earth you might have to write your own connection pool! Doing a good job of it is decidedly nontrivial, every application server can give you a DataSource with connection pooling built in, and if you're not working with an application server then there are plenty of fine pools around including open source ones.
- Peter
John Haake

Joined: Jun 23, 2003
Posts: 10
Being more of an Oracle DBA than a Java programmer I think I can answer this.
It sounds as though you are hitting the default process limit (it has been so long since my databases have been at default I can't remember), but you can bump this value up in the init<sid>.ora file in the ${ORACLE_HOME}/dbs directory. Here's the setting to change (and the value I have on one of my medium sized databases:
processes = 300

That will give you more head room, but to me it sounds scary that you would be writing your own pooling connections. Good luck.
I agree. Here's the link:
subject: ORA-00020: maximum number of processes (59) exceeded
It's not a secret anymore!