• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

oracle connection pool

 
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?
 
author & internet detective
Posts: 42003
911
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Sheriff
Posts: 3837
66
Netbeans IDE Oracle Firefox Browser
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Anyone have some suggestions on how I might find the connection leak?

Thanks
 
Hey cool! They got a blimp! But I have a tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic