Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.

Unable to see Content Models - The query read or traversed more than 100000 nodes. To avoid affecting other tasks, processing was stopped.

Avatar

Level 1

I am trying to create Content Model in AEM 6.4.3 (As per Content Fragment Models ),

But even if I enable the model in assets(Under Cloud Services tab), I am not able to see any content model in Tools-Assets-Content Fragment Models

1748763_pastedImage_1.png

Error -

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

Cannot serve request to /libs/dam/cfm/models/console/content/models.html/conf in /libs/dam/cfm/models/console/components/models/datasources/childdatasource/childdatasource.jsp

Exception:

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)

at org.apache.jackrabbit.oak.plugins.index.Cursors.checkReadLimit(Cursors.java:67)

at org.apache.jackrabbit.oak.plugins.index.lucene.LucenePropertyIndex$LucenePathCursor$1.next(LucenePropertyIndex.java:1695)

In my local it is working fine, but in QA env it is throwing the above error.

When I increase the LimitReads value in QueryEngineSettings(/system/console/jmx) it works fine, but I don't want to change it, as it is same in my local.

I removed maximum content from dam as well but still the issue persisted.

Please let me know if I am missing something and how can I fix this.

2 Replies

Avatar

Employee Advisor

First step is to setup a DEBUG logger on the following classes to find out which query is getting triggered when you load this page:

  • org.apache.jackrabbit.oak.plugins.index
  • org.apache.jackrabbit.oak.query

Once you have the query, Use the explain query tool within AEM to check if it is not using an index. Create an index using the oakutils tool.

[1] Oak Utilities : Index Definition Generator

Avatar

Level 4

Hello @Jaideep_Brar - I have created the index but still I am facing the same issue. If I increase the LimitReads then it works fine. 

this was my query  from the log - SELECT * FROM [cq:Page] AS p WHERE p.[jcr:path] LIKE '/conf/%/settings/dam/cfm/models' ORDER BY [jcr:path] 

 

and below is my index - 

{
"compatVersion": 2,
"async": "async",
"jcr:primaryType": "oak:QueryIndexDefinition",
"type": "lucene",
"indexRules": {
"jcr:primaryType": "nt:unstructured",
"cq:Page": {
"jcr:primaryType": "nt:unstructured",
"properties": {
"jcr:primaryType": "nt:unstructured",
"path": {
"name": "jcr:path",
"ordered": true,
"jcr:primaryType": "nt:unstructured"
},
"primaryType": {
"name": "jcr:primaryType",
"propertyIndex": true,
"jcr:primaryType": "nt:unstructured"
}
}
}
}
}