Expand my Community achievements bar.

SOLVED

How to set up the configuration of query time out

Avatar

Level 4

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.

1 Accepted Solution

Avatar

Correct answer by
Level 10

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

View solution in original post

4 Replies

Avatar

Level 2

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

Avatar

Level 4

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.

Avatar

Correct answer by
Level 10

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

Avatar

Level 4

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.