Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
Tausif Khanooni
Ranch Hand
Posts: 107
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Tausif
 
Lasse Koskela
author
Sheriff
Posts: 11962
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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...
 
Peter den Haan
author
Ranch Hand
Posts: 3252
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic