-
Type: Bug
-
Status: Resolved
-
Priority: Blocker
-
Resolution: Fixed
-
Affects Version/s: 2021.0
-
Component/s: Elasticsearch
-
Tags:
-
Backlog priority:1,000
-
Sprint:nxplatform #91
-
Story Points:2
The "computeElapsedTime" method in RoutingAuditHelper class uses the deprecated "getLogEntriesFor" method => it may be the cause to an excessive usage of scroll contexts on Elasticsearch side, leading to this error
Suppressed: org.elasticsearch.client.ResponseException: method [POST], host [https://*** URI [/nuxeo-audit/_search?typed_keys=true&max_concurrent_shard_requests=5&ignore_unavailable=false&expand_wildcards=open&allow_no_indices=true&ignore_throttled=true&scroll=1m&search_type=dfs_query_then_fetch&batched_reduce_size=512&ccs_minimize_roundtrips=true], status line [HTTP/1.1 500 Server Error] {\"error\":{\"root_cause\":[{\"type\":\"exception\",\"reason\":\"Trying to create too many scroll contexts. Must be less than or equal to: [500]. This limit can be set by changing the [search.max_open_scroll_context] setting.\"}],\"type\":\"search_phase_execution_exception\",\"reason\":\"all shards failed\",\"phase\&..
=> it should be replaced by the use of the method "queryLogs" with limit=1, this will turn the elasticsearch request into a search instead of a scroll, solving the problem, if caused by this usage.