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:
This seems to be the offending query causing the load on the DB:
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:
- Go to Confluence Admin >> Plugins >> Locate "Advanced Macros" plugin (you might need to expand the "System Plugins"), and disable it
- 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.