Expand my Community achievements bar.

AEM 6.3 Collections Search - Timeout Issue

Avatar

Level 1

When we click the search button inside a particular Collection or Smart collection, The system takes a lot of time to respond and most of the time, it end up in a 504  (Gateway Time-out) Exception.

In the logs, I see the below warning exceptions,

28.09.2018 12:09:11.541 *WARN* [148.107.12.20 [1538161747481] GET /mnt/overlay/granite/ui/content/shell/omnisearch/searchresults.html HTTP/1.1] com.day.cq.search.impl.builder.QueryImpl no PredicateEvaluator found for 'resourcePath'

28.09.2018 12:09:11.545 *WARN* [148.107.12.20 [1538161747481] GET /mnt/overlay/granite/ui/content/shell/omnisearch/searchresults.html HTTP/1.1] com.day.cq.search.impl.builder.QueryImpl no PredicateEvaluator found for 'resourcePath'

28.09.2018 12:09:11.549 *WARN* [148.107.12.20 [1538161747481] GET /mnt/overlay/granite/ui/content/shell/omnisearch/searchresults.html HTTP/1.1] com.day.cq.search.impl.builder.QueryImpl no PredicateEvaluator found for 'resourcePath'

28.09.2018 12:09:11.553 *WARN* [148.107.12.20 [1538161747481] GET /mnt/overlay/granite/ui/content/shell/omnisearch/searchresults.html HTTP/1.1] com.day.cq.search.impl.builder.QueryImpl no PredicateEvaluator found for 'resourcePath'

the Predicate Parameter that is passed to the search service, (The fulltext value is going as empty text, whenever a string or a character is passed, the query returns a value else 504 error is thrown)

Key = _charset_

Value = utf-8

Key = p.guessTotal

Value = true

Key = fulltext

Value =

Key = savedSearches@Delete

Value =

Key = savedSearches

Value =

Key = 2_path

Value =

Key = 2_path.breadcrumbs

Value = {$path}

Key = 3_group.property

Value = jcr:content/metadata/dc:format

Key = 3_group.p.or

Value = true

Key = 3_group.property.breadcrumbs

Value = File Type

Key = 4_rangeproperty.property

Value = jcr:content/metadata/dam:size

Key = 5_relativedaterange.property

Value = jcr:content/jcr:lastModified

Key = 6_group.property

Value = jcr:content/cq:lastReplicationAction

Key = 6_group.p.or

Value = true

Key = 6_group.property.breadcrumbs

Value = Publish Status

Key = 7_group.property

Value = jcr:content/metadata/dam:status

Key = 7_group.p.or

Value = true

Key = 7_group.property.breadcrumbs

Value = Approval Status

Key = 8_group.property

Value = jcr:content/cq:drivelock

Key = 8_group.property.breadcrumbs

Value = Checkout Status

Key = 9_group.property.value

Value =

Key = 9_group.property

Value = jcr:content/cq:drivelock

Key = 9_group.property.breadcrumbs

Value = Checked Out By

Key = 10_group.rangeproperty.property.breadcrumbs

Value = Expiry Status

Key = 11_group.property

Value = jcr:content/hasValidMetadata

Key = 11_group.p.or

Value = true

Key = 11_group.property.breadcrumbs

Value = Metadata Validation

Key = 12_rangeproperty.property

Value = jcr:content/averageRating

Key = 13_group.p.or

Value = true

Key = jcr:content/metadata/cq:tags@TypeHint

Value = String[]

Value = String[]

Key = jcr:content/metadata/cq:tags@Delete

Value =

Value =

Key = 14_group.p.or

Value = true

Key = 20_group.property

Value = jcr:content/usages/usedBy

Key = 20_group.p.or

Value = true

Key = 20_group.property.breadcrumbs

Value = Insights

Key = 15_group.property

Value = */*/*/jcr:content/jcr:mimeType

Key = 15_group.p.or

Value = true

Key = 15_group.property.breadcrumbs

Value = Video Format

Key = mainasset

Value = true

Key = 17_rangeproperty.property

Value = jcr:content/usages/dam:score

Key = 18_rangeproperty.property

Value = jcr:content/performance/dam:impressionCount

Key = 19_rangeproperty.property

Value = jcr:content/performance/dam:clickCount

Key = type

Value = dam:Asset

Key = memberOf

Value = /content/dam/collections/public/B/BKeJE6flLItY3901YGYw/creative_assets

Key = memberOf.breadcrumbs

Value = Collection

Key = location

Value = asset

Key = location.suggestion

Value = Assets

Key = _

Value = 1538084644374

Kindly help in identifying a fix for this issue.

2 Replies

Avatar

Level 2

504 is a timeout response code; implying search query is taking too long to run. You turn on debug logs using /system/console/slinglog on package org.apache.jackrabbit.oak.query and see the query being run, the query plan & index being used to serve results. Usually /content/dam path is part of the query run in backend even if its not explicitly sent ui. I suspect the query being run in your setup is missing the path constraint, causing a timeout.

Avatar

Level 1

Hi amalhotr​,

I am Sudarsan teammate, we run the process using Debug mode on, on checking the logs it seems that same query is executing multiple times, and yes '/content/dam' path was there in query , below is the query:

select [a].[jcr:path] as [jcr:path], [a].[jcr:score] as [jcr:score], [a].[jcr:primaryType] as [jcr:primaryType], [a].[jcr:createdBy] as [jcr:createdBy], [a].[jcr:created] as [jcr:created] from [dam:Asset] as [a] where (contains([a].[*], 'brandapproval-premium jpg')) and (isdescendantnode([a], [/content/dam/image/010]))