Invision community - Operation timed out

We're running elasticsearch on a self hosted Invision Community using nginx server and getting the below error and tasks locking.

IPS\Http\Request\CurlException (28) Operation timed out after 10001 milliseconds with 0 bytes received

Invision support have looked at this and informed us the following:

Blockquote
It looks like your Elasticsearch instance is running extremely slowly. We have written a test script which, completely independently of Invision Community, sends a request to Elasticsearch to update the views for a particular item. In most of my tests it is timing out.

Just wondered if anyone could help or if we could provide more information that would be able to help get to the bottom of this? Thanks in advance.

Blockquote
[2018-05-02T20:38:25,201][DEBUG][o.e.a.s.TransportSearchAction] [nlQfUT8] [content][1], node[nlQfUT8QTr-f1H7NRJhtzw], [P], s[STARTED], a[id=aTQhmOCHT4SeHa4XDaPczg]: Failed to execute [SearchRequest{searchType=QUERY_THEN_FETCH, indices=[content], indicesOptions=IndicesOptions[id=38, 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], types=, routing='null', preference='null', requestCache=null, scroll=null, maxConcurrentShardRequests=5, batchedReduceSize=512, preFilterShardSize=128, source={"from":2039900,"size":25,"query":{"function_score":{"query":{"function_score":{"query":{"bool":{"must":[{"multi_match":{"query":"Houraki","fields":["index_content^1.0","index_title^5.0"],"type":"best_fields","operator":"OR","slop":0,"prefix_length":0,"max_expansions":50,"zero_terms_query":"NONE","auto_generate_synonyms_phrase_query":true,"fuzzy_transpositions":true,"boost":1.0}}],"filter":[{"bool":{"should":[{"terms":{"index_class":["IPS\cms\Records4","IPS\cms\Records\Comment4","IPS\cms\Records\Review4"],"boost":1.0}},{"terms":{"index_class":["IPS\cms\Records5","IPS\cms\Records\Comment5","IPS\cms\Records\Review5"],"boost":1.0}},{"terms":{"index_class":["IPS\cms\Records6","IPS\cms\Records\Comment6","IPS\cms\Records\Review6"],"boost":1.0}},{"terms":{"index_class":["IPS\cms\Pages\PageItem"],"boost":1.0}},{"terms":{"index_class":["IPS\forums\Topic\Post"],"boost":1.0}},{"terms":{"index_class":["IPS\calendar\Event","IPS\calendar\Event\Comment","IPS\calendar\Event\Review"],"boost":1.0}},{"terms":{"index_class":["IPS\gallery\Image","IPS\gallery\Image\Comment","IPS\gallery\Image\Review"],"boost":1.0}},{"terms":{"index_class":["IPS\gallery\Album\Item","IPS\gallery\Album\Comment","IPS\gallery\Album\Review"],"boost":1.0}}],"adjust_pure_negative":true,"boost":1.0}},{"terms":{"index_permissions":[10,10,"m99677","*"],"boost":1.0}},{"term":{"index_hidden":{"value":0,"boost":1.0}}}],"adjust_pure_negative":true,"boost":1.0}},"functions":[{"filter":{"match_all":{"boost":1.0}},"linear":{"index_date_updated":{"scale":"120d","decay":"0.5"},"multi_value_mode":"MIN"}}],"score_mode":"multiply","max_boost":3.4028235E38,"boost":1.0}},"functions":[{"filter":{"match_all":{"boost":1.0}},"script_score":{"script":{"source":"doc['index_author'].value == 99677 ? ( score * 1.5 ) : score","lang":"painless"}}}],"score_mode":"multiply","max_boost":3.4028235E38,"boost":1.0}},"sort":}}] lastShard [true]
org.elasticsearch.transport.RemoteTransportException: [nlQfUT8][127.0.0.1:9300][indices:data/read/search[phase/query]]
Caused by: org.elasticsearch.search.query.QueryPhaseExecutionException: Result window is too large, from + size must be less than or equal to: [10000] but was [2039925]. See the scroll api for a more efficient way to request large data sets. This limit can be set by changing the [index.max_result_window] index level setting.
at org.elasticsearch.search.DefaultSearchContext.preProcess(DefaultSearchContext.java:206) ~[elasticsearch-6.2.4.jar:6.2.4]
at org.elasticsearch.search.query.QueryPhase.preProcess(QueryPhase.java:89) ~[elasticsearch-6.2.4.jar:6.2.4]
at org.elasticsearch.search.SearchService.createContext(SearchService.java:570) ~[elasticsearch-6.2.4.jar:6.2.4]
at org.elasticsearch.search.SearchService.createAndPutContext(SearchService.java:534) ~[elasticsearch-6.2.4.jar:6.2.4]
at org.elasticsearch.search.SearchService.executeQueryPhase(SearchService.java:330) ~[elasticsearch-6.2.4.jar:6.2.4]
at org.elasticsearch.search.SearchService$2.onResponse(SearchService.java:316) [elasticsearch-6.2.4.jar:6.2.4]
at org.elasticsearch.search.SearchService$2.onResponse(SearchService.java:312) [elasticsearch-6.2.4.jar:6.2.4]
at org.elasticsearch.search.SearchService$3.doRun(SearchService.java:1002) [elasticsearch-6.2.4.jar:6.2.4]
at org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingAbstractRunnable.doRun(ThreadContext.java:672) [elasticsearch-6.2.4.jar:6.2.4]
at org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:37) [elasticsearch-6.2.4.jar:6.2.4]
at org.elasticsearch.common.util.concurrent.TimedRunnable.doRun(TimedRunnable.java:41) [elasticsearch-6.2.4.jar:6.2.4]
at org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:37) [elasticsearch-6.2.4.jar:6.2.4]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_161]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_161]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_161]
the error is:
Caused by: org.elasticsearch.search.query.QueryPhaseExecutionException: Result window is too large, from + size must be less than or equal to: [10000] but was [2039925]. See the scroll api for a more efficient way to request large data sets. This limit can be set by changing the [index.max_result_window] index level setting.

The second Blockquote of your post contains a log line that provides the offending query, a summary line describing the root of your problem, and a possible remedy. Please take a look.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.