Uploaded image for project: 'Nuxeo Platform'
  1. Nuxeo Platform
  2. NXP-31973

RoutingAuditHelper is creating too many elastic scroll contexts

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: 2021.0
    • Fix Version/s: 2021.40, 2023.1
    • Component/s: Elasticsearch

      Description

      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.

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: