-
Bug
-
Resolution: Cannot Reproduce
-
Medium
-
None
-
3.0, 4.0.3, 4.2, 5.1.3
-
None
-
Support case affected Confluence 3.4.6, but this would affect all versions with the suggest labels functionality.
Problem
For large instances of Confluence, the suggest labels functionality can take a long time (5+ minutes) to return results, causing heavy load to the database in that duration. To clarify, this is the functionality that displays potential results when the user starts typing into the labels box.
The two actions (especially the second) that seem to cause this are:
- /json/suggestlabelsactivity.action
- /labels/autocompletelabel.action
Offending Query
This seems to be the offending query causing the load on the DB:
select * from ( select label3_.LABELID as LABELID, label3_.NAME as NAME, label3_.OWNER as OWNER, label3_.NAMESPACE as NAMESPACE, label3_.CREATIONDATE as CREATION5_, label3_.LASTMODDATE as LASTMODD6_, label3_.LABELID as x0_0_, count(label3_.LABELID) as x1_0_ from CONTENT_LABEL labelling0_, CONTENT spaceconte1_, SPACES space2_, LABEL label3_, CONTENT contentent4_ where spaceconte1_.CONTENTTYPE in ('com.atlassian.confluence.pages.AbstractPage', 'USERSTATUS', 'PAGE', 'BLOGPOST', 'MAIL', 'SPACEDESCRIPTION', 'com.atlassian.confluence.core.SpaceContentEntityObject') and labelling0_.LABELID=label3_.LABELID and ((label3_.NAMESPACE=:1 and labelling0_.LABELID=label3_.LABELID)and(labelling0_.CONTENTID=spaceconte1_.CONTENTID )and(spaceconte1_.SPACEID=space2_.SPACEID ) and(lower(space2_.SPACEKEY)=:2 )and(contentent4_.CONTENT_STATUS!='deleted' and labelling0_.CONTENTID=contentent4_.CONTENTID)) group by label3_.LABELID , label3_.NAMESPACE , label3_.OWNER , label3_.NAME , label3_.LASTMODDATE , label3_.CREATIONDATE order by count(label3_.LABELID)DESC ) where rownum <= :3
Workaround
The autosuggest/autocomplete label feature can be disabled:
- Backup confluence-install/confluence/includes/js/labels-min.js
- Modify confluence-install/confluence/includes/js/labels-min.js - look for bindAutocomplete:g or ,bindAutocomplete:e on the very last line. Comment it out, including one of the surrounding commas:
{return m(d(r,q,s))}/*,bindAutocomplete:g*/,isNewPage:j,routes:n,setLabelError:o,parseLabelStringToArray:c}
- Go to Confluence Admin >> Plugins >> Locate "Advanced Macros" plugin (you might need to expand the "System Plugins"), and disable it
- Once it's disabled, re-enable it again. This is to force expiry of the javascript cache to pick up the change.
- NB: If you make a syntax mistake when editing this file, the file will not be picked up at all and you may lose functionality eg the Create button, the Admin panel and Notifications and Tasks. Simply revert your change to the JS file, go to <your-url>/admin/viewplugins.action, disable and re-enable Advanced Macros again to expire the cache.
- is related to
-
CONFSERVER-24978 Allow admin to disable label autosuggest or autocomplete feature from admin console
- Closed
- relates to
-
CONFSERVER-25236 Slow response and Confluence crashing when you have too many labels
- Closed
-
CONFSERVER-58137 Performance Issues on Confluence caused by Label related queries
- Closed
- mentioned in
-
Page Loading...
-
Wiki Page Loading...
-
Wiki Page Loading...
-
Wiki Page Loading...
-
Wiki Page Loading...