Query traversal exception while upgrading to 6.4 | Community
Skip to main content
Adobe Champion
December 20, 2018
Solved

Query traversal exception while upgrading to 6.4

  • December 20, 2018
  • 3 replies
  • 3791 views

Hi all,

After upgrading our code from 6.1 to 6.4, we are getting below error for one of the query causing impact in functionality.

java.lang.UnsupportedOperationException: The query read or traversed more than 100000 nodes. To avoid affecting other tasks, processing was stopped.

at org.apache.jackrabbit.oak.query.FilterIterators.checkReadLimit(FilterIterators.java:70) [org.apache.jackrabbit.oak-core:1.8.2]

The same query listed below used to work in 6.1, but having issues in 6.4.

String query = SELECT * FROM [cq:PageContent] WHERE ([_____________] IS NOT NULL OR [____________] IS NOT NULL

Iterator<Resource> iterator = adminResourceResolver.findResources(query, Query.JCR_SQL2);

I tried manual oak:index creation as well as increasing In memory read to limit in Query Engine Settings Service OSGI, but it didn't help.

Help or Pointers to fix this in AEM 6.4 will be helpful.

Thanks

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

Thanks, Ashwin for the reply.

However, I already create oak: index node and also updated Query Engine Settings Service OSGI, but it also didn't help.

Any other specifics or suggestion which worked with 6.4?

3 replies

Ashwin_R
December 20, 2018

From 6.3 and above, query will be stopped if it traversing 10000 nodes. You need to write index for it to avoid traversing or update settings (Apache Jackrabbit Query Engine Settings Service). Be careful that if there are more traversal, then it will slow down the system.

More info - Troubleshooting Slow Queries

deepak3344Adobe ChampionAuthorAccepted solution
Adobe Champion
December 20, 2018

Thanks, Ashwin for the reply.

However, I already create oak: index node and also updated Query Engine Settings Service OSGI, but it also didn't help.

Any other specifics or suggestion which worked with 6.4?

Ravi_Pampana
Community Advisor
Community Advisor
December 20, 2018

Hi,

There is configuration to increase the query limit

Go to Config Mgr and search for below configuration and you can increase the limit as per your requirement. But it is always good to create indexing to avoid load on the instance.

Apache Jackrabbit Query Engine Settings Service