Resolve AEM Author performance issues after upgrade due to Oak query overload
After a Service Pack upgrade, Adobe Experience Manager (AEM) Author instances can experience intermittent slowness and downtime, even though CPU and memory usage don’t increase significantly. To resolve the issue, define and validate a custom Oak Lucene index for the query, and then deploy it to production.
Description description
Environment
Adobe Experience Manager (AEM) Author
Issue/Symptoms
- After you upgrade an AEM Author instance, you experience intermittent slowness and frequent downtime that disrupt authoring activities.
- The issue can occur even when there are no recent custom code changes or bulk operations.
- The logs contain a high volume of Oak Index-Traversed warnings.
- Error-notification workflows run abnormally frequently.
- Large-scale reindexing events occur after deployments.
- CPU and memory usage don’t increase significantly.
Root cause
The primary cause is an unindexed custom query (for example, a QueryBuilder query on DAM folders by node name) that results in full subtree scans. This leads to excessive repository traversal and triggers self-amplifying error-notification workflows, especially when DAM folders are missing or duplicated. Repository-wide reindexing triggered by deployments or restarts can further compound the issue during high-load periods.
Resolution resolution
Follow the steps below to resolve the issue:
-
Identify the unindexed query that causes repository traversal. Review your custom code for queries on DAM folders (such as searching by node name under a DAM path) that don’t have a supporting Oak index.
-
Define a custom Oak Lucene index to cover the query. For example, to index folder nodes by name under a specific DAM path, create a new index definition similar to the following (adjust paths and properties as needed):
code language-none { "jcr:primaryType": "oak:QueryIndexDefinition", "type": "lucene", "async": [ "async"] , "includedPaths": [ "/content/dam/your-folder-path"] , "indexRules": { "sling:Folder": { "properties": { "nodeName": { "name": ":nodeName", "propertyIndex": true } } } } } -
Deploy the custom index to a staging environment first:
- Allow the index to build.
- Validate that the query now uses the new index. Use Oak’s query explain tool or log analysis to confirm.
-
After you validate the index, deploy it to production. Monitor for fewer
Index-Traversedwarnings and improved performance. -
Normalize the DAM folder structure. Ensure that no folders are missing or duplicated, because these conditions can cause workflow errors or excessive workflow executions.
-
Refactor custom queries where possible to use deterministic path resolution. For example, persist DAM folder paths at import time and avoid querying on read.
-
Cap query result limits to prevent unbounded scans. For example, set
p.limitto a reasonable value. -
Deduplicate or dead-letter error-notification workflows to prevent self-amplifying execution loops.
-
Throttle and schedule bulk operations (such as rollouts or synchronization jobs) to avoid concurrent repository stress, especially during index rebuilds.
-
Delay high-volume authoring and publishing activities until Oak index rebuilding is complete after restarts or deployments.
-
Monitor the following for early warning signs of performance degradation:
- Replication queues
- Sling job queues
- Index status
- Log throughput
-
Establish automated alerts and controls to pause bulk operations when performance degrades.
-
After you implement these steps, verify that the Author instance performance is stable and that log warnings related to repository traversal are significantly reduced.