Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

ora-00020 too many processes

 
Deepak Bala
Bartender
Posts: 6663
5
Firefox Browser Linux MyEclipse IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
We have a batch process that executes every so seconds and this morning i found that the batch was throwing ora-00020 exception every time it tries to execute a query. I have a doubt on which method to adopt to make sure such errors dont happen again. Here are my approches

1. Make the batch process obtain a connection every time and then close it when it is done.

2. Make the batch process obtain a single connection and execute my queries based on this connection. I will not close this connection for every loop. This connection would be obtained only once and the infinite loop uses it.


I think i would be better off with approach number 1. That way if the database is down at any point of time the batch need not be started again. Also... if say i obtain a connection everytime like

conn = something.getConnection();

and i dont close this connection i am bound to get ORA-00020 arent I ?

The solution is not to increase the number of processes because we already have a number that is phenominally high than needed so i am pretty sure the program is screwed up some where.

Please let me know what you think
 
Deepak Bala
Bartender
Posts: 6663
5
Firefox Browser Linux MyEclipse IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ah ! solved this one yesterday. I re establish connection for every loop and that releases all my resources. The batch runs well now.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic