• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Oracle DB connections not releasing from connection pool in Tomcat 8

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
We are migrating Tomcat6, java 6 and Oracle 10g web-applications to Tomcat 8, Java 8 and Oracle 10g. Our applications working fine after migrated, but initial connections (initialSize="5") available in connection pool not released after Tomcat shut down. When second time starting tomcat, its creating 5 more initial connections to pool. I am using below resource configuration in server.xml
And below resource link configuration in application META_INF/context.xml
I am using ojdbc7.jar for oracle driver. Please help whether i missed any configuration..
 
Ranch Hand
Posts: 417
Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Are you aware of so_linger?

Are you sure this didn't occur before and how do you tell tomcat really keeps database connections open? Perspective is important here,,,

Did you switch OS as well when migrating to tomcat?

When the above are checked; tomcat has to tell the pool to release resources somehow when it shuts down. Please check the above issues first although.

http://wiki.treck.com/Socket_Options
https://msdn.microsoft.com/en-us/library/windows/desktop/ms738547%28v=vs.85%29.aspx
https://stackoverflow.com/questions/3757289/tcp-option-so-linger-zero-when-its-required
etc...
 
Raja Karunanidi
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

A.J. Côté wrote:Are you aware of so_linger?

Are you sure this didn't occur before and how do you tell tomcat really keeps database connections open? Perspective is important here,,,

Did you switch OS as well when migrating to tomcat?

When the above are checked; tomcat has to tell the pool to release resources somehow when it shuts down. Please check the above issues first although.

http://wiki.treck.com/Socket_Options
https://msdn.microsoft.com/en-us/library/windows/desktop/ms738547%28v=vs.85%29.aspx
https://stackoverflow.com/questions/3757289/tcp-option-so-linger-zero-when-its-required
etc...



Thanks for your reply Mr.Côté.
I checked connection pool releasing its initial connection (initialSize=5) in Tomcat 6 shutdown through oracle DB v$session table. But its not happening on Tomcat 8 and Java 8. For more verification i tried below combinations:
Tomcat 6 & Java 6 - Connections Releasing - Working fine
Tomcat 6 & Java 8 - Connections Releasing - Working fine
Tomcat 8 & Java 6 - Connections Not releasing
Tomcat 8 & Java 8 - Connections Not releasing
Whether i missed any configurations for Tomcat 8 or have to use any special oracle driver jar??





 
reply
    Bookmark Topic Watch Topic
  • New Topic