search_context_missing_exception: No search context found for id (scroll expired)(id に対応する検索コンテキストがない (scroll 期限切れ))
Elasticsearch意味
scroll クエリが使用する検索コンテキストがサーバー上にもう存在しない。通常、scroll コンテキストがタイムアウトまたはクリアされた後に、保存した scroll_id で続行しようとした場合に発生する。
原因
scroll に指定した keep-alive が期限切れになった (要求間の間隔が長すぎる)、コンテキストが手動でクリアされた (clear scroll)、またはノードの再起動でコンテキストが失われた。scroll コンテキストはノードのメモリに保持されるため、存続期間は限られている。
対処方法
すべての scroll 要求で十分な keep-alive を渡し (例: scroll=5m)、ページ間の遅延を短くする。最新の Elasticsearch では、深いページングに scroll ではなく search_after + Point in Time (PIT) を使用する。よりスケーラブルで推奨される方法である。終了したらコンテキストを解放し (clear scroll)、メモリを無駄にしない。
同じデータベースの他の項目
- invalid_index_name_exceptioninvalid_index_name_exception
- resource_not_found_exceptionresource_not_found_exception
- process_cluster_event_timeout_exceptionprocess_cluster_event_timeout_exception
- aliases_not_found_exceptionAliases missing(エイリアスが存在しない)
- snapshot_missing_exceptionSnapshot is missing(スナップショットが存在しない)
- index_template_missing_exceptionIndex template is missing(インデックステンプレートが存在しない)
- settings_exceptionInvalid settings(無効な設定)