Thursday, July 19, 2012

DB Connections Accumulated while navigating through Webcenter pages

DB Connections Accumulated

Issue :

While navigating through the webcenter pages found a strange behavior around DB connections count.
Each time the user navigates to a page the DB connection count increased. The DB connections got accumulated and we had to restart the Spaces server every now and then.  The performance was degraded.

Solution:

While generating the top level menu in the page template hyperlink component was used.

When the user click on the hyperlink a URL gets generated along with the following parameter contains the state of your session which is appended to the url

adf.ctrl-state%3X232w0en123_45

Each time the hyperlink is accessed ADF regenerates a new parameter(adf.ctrl-state%3Z3422uu0en678_98) and complete session state, so it's essentially creates a new session that will use resources.

As a result each time the user click on hyperlink the number of connections increased by one every time.

Use of an ADF Component instead of hyperlink component that doesn't show the same problem.  The current page url would have the same parameters attached irrespective of several navigation across pages and would use the same DB connection.