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!