This week's giveaways are in the MongoDB and Jobs Discussion forums. We're giving away four copies of Mongo DB Applied Patterns and 4 resume reviews from Five Year Itch and have the authors/reps on-line! See this thread and this one for details.
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!
Joined: Apr 18, 2008
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.