• 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

OracleConnectionCacheManager refresh problem

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi we have a problem with our Oracle connection pool.

We have a thread which triggers every 30 minutes in order to refresh stale connections, calling cacheManager.refreshCache(CACHE_NAME, OracleConnectionCacheManager.REFRESH_INVALID_CONNECTIONS).

When this happens it appears to lock the pool for a period of time and all requests take longer than normal. Sometimes its a few seconds, sometimes a few minutes which is when its an issue.

The fact it is locking implies that its creating new connections which would indicate to me that there are stale connections, however it also appears that it is making new connections when id doesn't need to.

Cache has maximum of 100 connections, before the refresh it had a cache size of 97 (active+available connections), with 84 available.

After the refresh it had 102 connections, with 92 available. Which implies it created more available despite there being plenty there, it also exceeded the maximum of 100.

The only options on the cache we're using aside from the min, max and initial sizes is cache.validate.connection.

So the questions are...

1) Why is it exceeding the max limit of 100?
2) Why is it seemingly creating new connections all the time when there are apparently plenty of available connections?

Hopefully someones seen this before and can help?

I can provide code if need be but didn't want to make this to long!
 
Dave Cumming
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
An addition to this as I jumped the gun slightly. According to our logging even between the refresh cycles the cache appears to grow in size despite the logging claiming that there are plenty of available connections. My thoughts on that were that they possibly weren't really available for some reason hence focusing on the refresh stage but thought this info might help someone diagnose what the issue is.
reply
    Bookmark Topic Watch Topic
  • New Topic