• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

oracle connection pool

 
Ryan Tracy
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am using the Oracle jdbc driver and I am having some issues where connections are not being released. I am making sure that the close is being called in a finally clause. I am calling the datasource.getConnection() in a static class. Does anyone know what could be causing the the connections to max out in oracle?
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 35279
384
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is it possible those are idle connections? Oracle doesn't "empty" the pool unless you set a preferred pool size parameter. The idea is that once a connection is sued, it stays in the pool available to others.
 
Ryan Tracy
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I thought that at first, but then the application starts not being able to connect to oracle once the oracle sessions get too high. We keep raising the connection max parameter, but they just fill up and once they fill up I get unable to connect exceptions. I have the max parameter set to default initially. I incremented it 50 each time a changed it. I am at 350 currently.
 
Martin Vajsar
Sheriff
Posts: 3752
62
Chrome Netbeans IDE Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It really sounds like a connection leak to me.

I am making sure that the close is being called in a finally clause.

I'd check this one again. Make sure that the finally clause is always completed - that is, that any exception raised in the finally clause itself is properly handled, otherwise the finally clause might not run completely.
 
Ryan Tracy
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Here is my static connection class


Here is the use:


Do you see any problems with the way I have written this code that could cause a connection leak?

Thanks
 
Ryan Tracy
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Anyone have some suggestions on how I might find the connection leak?

Thanks
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic