I have a client that is on AEM 6.2 and I am being asked to set timeouts on xpath searches. Looking at the documents for javax.jcr.query.QueryManager, I don't see any way to do this.
Is there a way to watch a query's execution time and kill the thread after X number of seconds?
Solved! Go to Solution.
Views
Replies
Total Likes
Unfortunately that's not possible with the current implementation. But you can set limits how many nodes should be iterated at max.
Jörg
Views
Replies
Total Likes
Unfortunately that's not possible with the current implementation. But you can set limits how many nodes should be iterated at max.
Jörg
Views
Replies
Total Likes
That is what I was afraid of. The client has a lot of sites and authors are dumping large numbers of assets, many could be duplicates so the search in the sidekick for assets takes a very long time to return results. Limit would help where assets are found, but not in the case where it takes a long time to complete. That is the biggest problem is limiting queries that take very long to complete. The user might leave the page but the queries run on, consuming CPU cycles that are no longer needed.
Views
Replies
Total Likes
Just a thought.
We can try doing multiple searches with limited nodes (1 call for each site) and append results. In this way, we can avoid additional calls if user leaves the page.
Views
Replies
Total Likes
Alternatively you can create oak indexes to optimise your query.
Views
Replies
Total Likes
I guess the only chance to mitigate that is not to kill long-running query but to avoid long-running queries at all. Of course with all combinations used you can create arbitrarily complex queries which take a long time to complete. But I am not really aware of immediate issues where the sidekick is unusable due to slow queries. If that's the case I would contact Adobe support.
Do you have any query which is created by sidekick and which is slow or which is traversing the tree instead of using an index?
Jörg
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies
Views
Likes
Replies
Views
Likes
Replies