Monday, February 20, 2017

How to set ReadLimits and terminate a slow query in AEM/CQ5

When we execute a query using query builder in AEM/CQ5 and for that query system is not able to return any output and you found that it is still executing. 
Then you went to error log file and find the error:"consider creating an index or changing the query [time stamp] *WARN* [qtp1617436028-18416] org.apache.jackrabbit.oak.spi.query.Cursors$TraversingCursor Traversed 987000 nodes with filter Filter(query=#)", it means your query is still running and will keep running till the time it completed maximum read limit. 
If you want to stop this query to run which is unnecessary consuming performance of your system then follow the following steps.

1. Go to http://localhost:4503/system/console/jmx 
2. Find the type "QueryEngineSettings" and name settings.
3. Open settings. 

4. Then change the ReadLimit to either 1 or 2.

5. save and refresh the page. Now go and check the error log file you will not find that query anymore in the execution.

For more detail you can read the following links:
[1] http://jackrabbit.apache.org/oak/docs/query/query-engine.html
[2] https://docs.adobe.com/docs/en/cq/5-6-1/core/administering/jmx-console.html
[3] https://docs.adobe.com/docs/en/cq/5-6-1/core/administering/jmx-console.html#Using the JMX Console
[4] http://tech.ethomasjoseph.com/2015/03/tuning-your-jcr-queries-for-aem.html

No comments:

Post a Comment

Popular Posts