Skip to content
This repository has been archived by the owner on Aug 2, 2022. It is now read-only.

Stats API Call timeout exception #107

Closed
jmazanec15 opened this issue May 5, 2020 · 0 comments
Closed

Stats API Call timeout exception #107

jmazanec15 opened this issue May 5, 2020 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@jmazanec15
Copy link
Member

GET /_opendistro/_anomaly_detection/stats occasionally results in the following error message:

{
  "error": {
    "root_cause": [
      {
        "type": "timeout_exception",
        "reason": "Cannot get response within time limit: SearchRequest{searchType=QUERY_THEN_FETCH, indices=[.opendistro-anomaly-detectors], indicesOptions=IndicesOptions[ignore_unavailable=false, allow_no_indices=true, expand_wildcards_open=true, expand_wildcards_closed=false, allow_aliases_to_multiple_indices=true, forbid_closed_indices=true, ignore_aliases=false, ignore_throttled=true], types=[], routing='null', preference='null', requestCache=null, scroll=null, maxConcurrentShardRequests=0, batchedReduceSize=512, preFilterShardSize=128, allowPartialSearchResults=true, localClusterAlias=null, getOrCreateAbsoluteStartMillis=-1, ccsMinimizeRoundtrips=true, source={\"size\":0}}"
      }
    ],
    "type": "timeout_exception",
    "reason": "Cannot get response within time limit: SearchRequest{searchType=QUERY_THEN_FETCH, indices=[.opendistro-anomaly-detectors], indicesOptions=IndicesOptions[ignore_unavailable=false, allow_no_indices=true, expand_wildcards_open=true, expand_wildcards_closed=false, allow_aliases_to_multiple_indices=true, forbid_closed_indices=true, ignore_aliases=false, ignore_throttled=true], types=[], routing='null', preference='null', requestCache=null, scroll=null, maxConcurrentShardRequests=0, batchedReduceSize=512, preFilterShardSize=128, allowPartialSearchResults=true, localClusterAlias=null, getOrCreateAbsoluteStartMillis=-1, ccsMinimizeRoundtrips=true, source={\"size\":0}}"
  },
  "status": 500
}

This is a result of an expensive timed blocking call here to count up the documents in the index via Search. (1) SearchRequest should be replaced with an IndicesStatsRequest and (2) the call should be converted to an asynchronous call outside of the transport layer.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants