Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

OracleConnectionCacheManager refresh problem

 
Dave Cumming
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • 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
  • 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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic