-
Bug
-
Resolution: Fixed
-
Medium
-
2.5, 2.6.0, 2.7, 2.8, 2.9
-
None
-
13
-
In an environment where there is thousands of pages, the PageNotFound action is extremely CPU intensive when the alternative page search hits many pages.
One such example to be considered is the space home page in an environment with thousands of spaces. If the home page of a space (EXAMPLE) is changed from "Home" to some other page and the URL mywiki/display/EXAMPLE/Home is visited, the alterative page search will hit every other "Home" page in all of the other spaces. From stack traces it appears that this operation will spend much time in the permission checking code path, triggering constant Hibernate session flushes to the DB.
Such operations may last tens of minutes in production environments and are often exacerbated when frustrated users constantly click refresh in an attempt to elicit a response from the application.
The options are to limit the number of alternatives we propose (useful in a general sense anyway, 2000 alternatives is not really helpful) and/or reduce the cost of permission checks in this case.
Patch available
To apply the patch (tested in Confluence 2.6 and later):
1. Shut down Confluence
2. Find the file alternativepages.vm in the pages/ directory of your Confluence application. Replace it with the attached version.
3. Find the file xwork.xml in the WEB-INF/classes/ directory of your Confluence application. Find the following lines in the file:
<action name="pagenotfound" class="com.atlassian.confluence.pages.actions.PageNotFoundAction"> <result name="error" type="dispatcher">/fourohfour.action</result> <result name="success" type="velocity">/pages/alternativepages.vm</result> </action>
Change the class in the first line to "com.atlassian.confluence.core.ConfluenceActionSupport" as shown below:
<action name="pagenotfound" class="com.atlassian.confluence.core.ConfluenceActionSupport"> <result name="error" type="dispatcher">/fourohfour.action</result> <result name="success" type="velocity">/pages/alternativepages.vm</result> </action>
4. Start Confluence again. The "Page not found" page should now load quickly, irrespective of how many spaces are in the instance.
- is related to
-
CONFSERVER-16996 findPagesWithHistoricalTitle broken on Oracle / DB2
- Closed
-
CONFSERVER-34494 Accessing a renamed or deleted page causes database CPU spikes and Confluence outages
- Closed
-
CONFSERVER-17030 Query to find page alternatives fails on DB2 because we are invoking SELECT DISTINCT on the VERSIONCOMMENT clob column
- Closed
-
CONFSERVER-14209 Umbrella Issue for a large Instance with many spaces
- Closed
- relates to
-
CONFSERVER-15233 Purging Trash is Slow and Blocks DB Writes
- Closed
-
CONFSERVER-24886 Accessing a renamed or deleted page can cause system instability
- Closed
-
CONFSERVER-24887 Create an easy way for Administrators to disable PageNotFound.action and instead present a standard 404
- Closed