Skip to content

SavedObjects limit greater than ES max result window #22636

@jpcarey

Description

@jpcarey

Kibana version: 6.4.0

Describe the bug: The savedObjects:listingLimit in the Kibana Advanced Settings will set the size setting for the search request sent to elasticsearch. This is used to load dashboards and visualizations. If this is set to a value larger than elasticsearch's index.max_result_window (default: 10k), it results in Kibana displaying a blank page for dashboards or visualizations.

It seems like if you can customize savedObjects:listingLimit in Kibana, it should gracefully handle any error that might result from misconfiguration. That, or switch to an elasticsearch scroll request or page through the search results.

https://www.elastic.co/guide/en/elasticsearch/reference/6.4/search-request-from-size.html

Note that from + size can not be more than the index.max_result_window index setting which defaults to 10,000

Error in kibana log

 error  [20:01:57.817]  [query_phase_execution_exception] Result window is too large, from + size must be less than or equal to: [10000] but was [100000]. 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. :: {"path":"/.kibana/_search","query":{"size":100000,"from":0},"body":"{\"version\":true,\"query\":{\"bool\":{\"filter\":[{\"terms\":{\"type\":[\"dashboard\"]}}]}}}","statusCode":500,"response":"{\"error\":{\"root_cause\":[{\"type\":\"query_phase_execution_exception\",\"reason\":\"Result window is too large, from + size must be less than or equal to: [10000] but was [100000]. 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.\"}],\"type\":\"search_phase_execution_exception\",\"reason\":\"all shards failed\",\"phase\":\"query\",\"grouped\":true,\"failed_shards\":[{\"shard\":0,\"index\":\".kibana\",\"node\":\"zKXGxqLJQ_eV3OUzQhykKQ\",\"reason\":{\"type\":\"query_phase_execution_exception\",\"reason\":\"Result window is too large, from + size must be less than or equal to: [10000] but was [100000]. 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.\"}}]},\"status\":500}"}
    at respond (/Users/jared/builds/kibana/kibana-6.4.0-darwin-x86_64/node_modules/elasticsearch/src/lib/transport.js:307:15)
    at checkRespForFailure (/Users/jared/builds/kibana/kibana-6.4.0-darwin-x86_64/node_modules/elasticsearch/src/lib/transport.js:266:7)
    at HttpConnector.<anonymous> (/Users/jared/builds/kibana/kibana-6.4.0-darwin-x86_64/node_modules/elasticsearch/src/lib/connectors/http.js:159:7)
    at IncomingMessage.bound (/Users/jared/builds/kibana/kibana-6.4.0-darwin-x86_64/node_modules/elasticsearch/node_modules/lodash/dist/lodash.js:729:21)
    at emitNone (events.js:111:20)
    at IncomingMessage.emit (events.js:208:7)
    at endReadableNT (_stream_readable.js:1064:12)
    at _combinedTickCallback (internal/process/next_tick.js:138:11)
    at process._tickDomainCallback (internal/process/next_tick.js:218:9)

Steps to reproduce:

  1. Set savedObjects:listingLimit to 100k in Kibana's Advanced Settings UI
  2. Click on the Dashboards or Visualizations

Metadata

Metadata

Assignees

No one assigned

    Labels

    Feature:Kibana ManagementFeature label for Data Views, Advanced Setting, Saved Object management pagesTeam:CoreCore services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etcenhancementNew value added to drive a business result

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions