Skip to main content
Level 3
Jun 15, 2016 9:42 AM UTC
Solved

How to set up the configuration of query time out

Hi Guys,

Does anyone know how to set up the configuration of query search’ time out (such as if the query running more than 2 minutes it will auto time out and stop the query)? I checked the configuration of osgi, it looks no any options for this.
It’s due to our cq6.1 instance running slow by some query. Thus I would like to stop the query search if it performed a long time.
Thanks.
Best Regards.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Sham_HC
Sham_HCAccepted solution
Level 10
Jun 28, 2016 2:29 PM UTC

Not an exact soution what you are looking but near by to solve your usecase. Configure limits using the system properties “oak.queryLimitInMemory” and “oak.queryLimitReads”. Queries that exceed one of the limits are cancelled with an UnsupportedOperationException saying that “The query read more than x nodes… To avoid running out of memory, processing was stopped.” On startup script add

 

-Doak.queryLimitInMemory=500000  -Doak.queryLimitReads=100000  -Dupdate.limit=250000 -Doak.fastQuerySize=true

4 replies

jörg_hoh1
Level 2
Jun 15, 2016 8:33 PM UTC

Hi,

why don't you have indexes backing your queries? I would expect, that you test all your queries and make sure that they are actually using an index, so you don't need to kill queries taking too long.

IIRC there is no such parameter there.

Jörg

Translate
jiaBaiAuthor
Level 3
Jun 16, 2016 4:26 AM UTC

Hi Jorg,

Thanks for your input.

There is some issue about our indexes and always printing IndexCorruptionException, for this issue I have created a ticket for adobe supporter.

I just trying to find a temporary way to stop the query.

Regards.

Translate
Sham_HC
Sham_HCAccepted solution
Level 10
Jun 28, 2016 2:29 PM UTC

Not an exact soution what you are looking but near by to solve your usecase. Configure limits using the system properties “oak.queryLimitInMemory” and “oak.queryLimitReads”. Queries that exceed one of the limits are cancelled with an UnsupportedOperationException saying that “The query read more than x nodes… To avoid running out of memory, processing was stopped.” On startup script add

 

-Doak.queryLimitInMemory=500000  -Doak.queryLimitReads=100000  -Dupdate.limit=250000 -Doak.fastQuerySize=true

Translate
jiaBaiAuthor
Level 3
Jun 29, 2016 4:49 AM UTC

Hi Sham,

Thanks share knowledge.

I have added these properties in start script. You are right it's not an exact soution to resolve this issue.

It looks there is no any option to set the query timeOut .

Regards.

Translate