Issue with Content fragment deletion | Community
Skip to main content
Level 2
February 28, 2025

Issue with Content fragment deletion

  • February 28, 2025
  • 3 replies
  • 1014 views
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

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

3 replies

TarunKumar
Community Advisor
Community Advisor
March 3, 2025

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

 
 
VivekSr1Author
Level 2
March 7, 2025

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.

 

giuseppebaglio
Level 10
March 7, 2025

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

giuseppebaglio
Level 10
March 3, 2025

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.

kautuk_sahni
Community Manager
Community Manager
March 5, 2025

@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