コミュニティアチーブメントバーを展開する。

Issue with Content fragment deletion

Avatar

Level 2
When I am deleting Content fragment from AEM 6.5.21 its throwing below error. Which I have found in network Tab.
org.apache.jackrabbit.oak.query.RuntimeNodeTraversalException: The query read or traversed more than 100000 nodes. To avoid affecting other tasks, processing was stopped.
org.apache.jackrabbit.oak.query.RuntimeNodeTraversalException: The query read or traversed more than 100000 nodes. To avoid affecting other tasks, processing was stopped.

RequestURI=/bin/wcmcommand
Servlet=com.day.cq.wcm.core.impl.commands.WCMCommandServlet

8 返信

Avatar

Community Advisor

Hi @VivekSr1 ,

 

You're encountering a "node traversal error" when attempting to delete a content fragment becausing system is traversing too many nodes exceeding the set limit, often triggering an error message like "org.apache.jackrabbit.oak.query.RuntimeNodeTraversalException.". 
 
It may happen due to:-
  • Complex Fragment Structure:
    If your content fragment has a very intricate hierarchy with numerous nested components or variations, it can lead to a large number of nodes that need to be processed during deletion, potentially exceeding the traversal limit.
     
  • Outdated AEM Version:
    Occasionally, older AEM versions might have limitations regarding node traversal, making large content fragments more prone to errors. 
     
    Solution:-
  • Simplify the hierarchy: Review your content fragment and try to restructure it by consolidating nested components or variations to minimize the number of nodes involved.
  • Clean up unused content: Remove any unnecessary elements or content that might be adding complexity to the fragment.
     
    Consider AEM configuration:
    • Check node traversal limits: Change the limit in "Apache Jackrabbit Query Engine Settings Service" in the AEM web console.
       

    -Tarun

 
 

Avatar

Level 2

Hi @TarunKumar ,

 

I am using AEM 6.5.21.

I have restarted my AEM TST and now I am getting message "This item is activated" which you can see in screenshot. And I am getting error 412 in wcmcommand.

VivekSr1_0-1741330116535.png

 

Avatar

Level 5

Could you please provide the log messages associated with that error?

Avatar

Level 2

Getting below error in network tab.

VivekSr1_0-1741348206982.png

 

Avatar

Level 5

It means the page you're trying to delete is currently linked or referenced by another page. The system is preventing you from deleting it to avoid breaking those references, which could lead to issues like broken links or missing content.
Open the References Rail and it will list the specific page(s) that are linked to the page you're trying to delete. Now you can update or remove the reference with a different page. Finally you can try deleting the original page again. The error should no longer appear.

Avatar

Level 2

Thanks for your quick response.

This error is coming for every fragment like new as well .

I had created a new content fragment and trying to delete and getting the same error.

Avatar

Level 5

You can use a JCR-SQL2 query similar to the following to count the nodes under a given path:

SELECT COUNT(*) AS total FROM [nt:base] AS node
WHERE ISDESCENDANTNODE(node, '/your/path')

Replace '/your/path' with the actual path you want to count nodes for. This query uses the COUNT(*) function to return the total number of nodes under the specified path.
When the number of nodes exceeds 100,000, the query, instead of completing, it throws a RuntimeNodeTraversalException to prevent excessive resource consumption and potential performance degradation.

By conducting this test, you can confirm that the issue is specifically related to the number of nodes under the root node. I recommend performing this in a non-live environment due to potential negative impacts.

Avatar

Administrator

@VivekSr1 Did you find the suggestions helpful? Please let us know if you need more information. If a response worked, kindly mark it as correct for posterity; alternatively, if you found a solution yourself, we’d appreciate it if you could share it with the community. Thank you!



Kautuk Sahni