ProductAssetListener may cause SegmentNotFoundException and performance issues

Description description

Environment

  • Experience Manager

Issues/Symptoms
ProductAssetListener may cause SegmentNotFoundException and performance issues in AEM 6.5.6, AEM 6.5.7 and AEM 6.4.6+.

Typical error message of SegmentNotFoundException by this issue contains the stacktrace like below.

*ERROR* sling-oak-observation-4 org.apache.jackrabbit.oak.segment.SegmentNotFoundExceptionListener
Segment not found: 6376814a-9273-4df8-aedd-ec5e6eb7ab52. SegmentId age=238801954ms,segment-generation=GCGeneration

org.apache.jackrabbit.oak.segment.SegmentNotFoundException: Segment 6376814a-9273-4df8-aedd-ec5e6eb7ab52 not found

at com.adobe.cq.commerce.impl.asset.ProductAssetListener.onEvent(ProductAssetListener.java:153)

The performance issues can be slowness, no response and replication queue delay/block. When the issue begins, following message appear in error.log.

*WARN* sling-oak-observation-4 com.adobe.cq.commerce.impl.asset.ProductAssetListener NODE_MOVED event
for /content/dam/asset/metadata does not have required event info

Thread dumps during the issue contains a sling-oak-observation thread with ProductAssetListner is running aggressively.

“sling-oak-observation-4” prio=5 tid=0xd7 nid=0xffffffff runnable

                at com.adobe.cq.commerce.impl.asset.ProductAssetListener.onEvent(ProductAssetListener.java:153)

Resolution resolution

This issue has been fixed with AEM 6.5.8.

https://experienceleague.adobe.com/docs/experience-manager-65/release-notes/service-pack/previous-hotfixes-featurepacks.html?lang=en

Product asset reference update causes replication threads to be in the wait state until the ProductAssetListener thread completes its commits to the JCR (NPR-35269).

For AEM 6.4.6+, disabling the OSGi component com.adobe.cq.commerce.impl.asset.ProductAssetListener is a workaround. To do that, you can use Component Disabler in ACS AEM Commons.

https://adobe-consulting-services.github.io/acs-aem-commons/features/osgi-disablers/component-disabler/index.html

How to configure Component Disabler:

  1. In CRX/DE, create a sling:OSGiConfig node as /apps/your project/config/com.adobe.acs.commons.util.impl.ComponentDisabler

  2. Add a String property with name = “components”, value =  “com.adobe.cq.commerce.impl.asset.ProductAssetListener”

recommendation-more-help
3d58f420-19b5-47a0-a122-5c9dab55ec7f