AEM 6.1_Prevent rapid repository growth caused by Linkchecker



Issue : Repository growth

Recommendation

 Starting from CQ 5.6.1, the referencedBy property has been introduced in order to keep track of the pages that reference the same link.

However, in case a link such as external links in the page footers is referenced from too many pages, Linkchecker performs a lot of JCR writes/update causing CPU peaks as well as performance decreases, mainly caused by the JCR locks.

To verify if the repository growth is related to the linkchecker, enable TRACE log level for org.apache.jackrabbit.oak.jcr.operations.writes during a few minutes, and check if the majority of the writes are below /var/linkchecker. Then do not forgot to disable the TRACE log level.
In such cases where performance is compromised by this linkchecker behavior, it is recommended to disable this feature by following the steps below:

Solution

1. Delete /var/linkchecker (it will be recreated automatically)

2. In the OSGI configuration console, open Day CQ Link Checker Info Storage Service and deselect "Save external link references” option and save.

Please note that, disabling this option will not cause automatic removal of the existing referencedBy property values. To achieve this, first remove /var/linkchecker.

AEM 6.1_revision_cleanup


The compaction of tar files can be triggered manually in the Operations Dashboard via a maintenance job called Revision Clean Up.
To start Revision Clean Up you need to:
§  Go to the AEM Welcome Screen.
§  In the main AEM window, go to Tools - Operations - Dashboard - Maintenance or directly browse tohttp://localhost:4502/libs/granite/operations/content/maintenance.html
§  Click on Daily Maintenance Window.
§  Hover over the Revision Clean Up window and press the Start button.
file
The icon will turn orange to indicate that the Revision Clean Up job is running. You can stop it at any time by hovering the mouse over the icon and pressing the Stop button:
file

Invoking Revision Garbage Collection via the JMX Console

§  Open the JMX Console by going to http://localhost:4502/system/console/jmx
§  Click the RevisionGarbageCollection MBean.
§  In the next window, click startRevisionGC() and then Invoke to start the Revision Garbage Collection job.

AEM 6.1_Disable WebDAV


Recommendation

WebDAV should be disabled on the publish environment. This can be done by stopping the appropriate OSGi bundles.
Connect to the Felix Management Console running on:
http://<host>:<port>/system/console
For example http://localhost:4503/system/console/bundles.
In the list of bundles, find the bundle named:
a.     Apache Sling Simple WebDAV Access to repositories (org.apache.sling.jcr.webdav)
§  Click the stop button (in the Actions column) to stop this bundle.
§  Again in the list of bundles, find the bundle named:
b.     Apache Sling DavEx Access to repositories (org.apache.sling.jcr.davex)
§  Click the stop button to stop this bundle.

Note

A restart of AEM is not required.

WebDav related findings

Finding ID
JVM Name
Total risk
Effort to Fix
WD1
Stop Apache Sling Simple WebDAV
Critical
Low
WD2
Stop Apache Sling DavEx
Critical
Low