Too many scroll error

Hi,

We encountered an error "Trying to create too many scroll context". What is the possible trigger of this error and how should we avoid it. We only resolve this issue when we restarted the ES.

Thanks

Welcome to our community! :smiley:

Can you post the entire error? What do your Elasticsearch logs show? What version are you on? What is requesting scrolls from Elasticsearch - what sort of client or code?

Thank you warkolm.

We are using ES v7.62

Here is the error

{"msg":"[exception] Trying to create too many scroll contexts. Must be less than or equal to: [1024]. This limit can be set by changing the [search.max_open_scroll_context] setting. (and) [exception] Trying to create too many scroll contexts. Must be less than or equal to: [1024]. This limit can be set by changing the [search.max_open_scroll_context] setting. (and) [exception] Trying to create too many scroll contexts. Must be less than or equal to: [1024]. This limit can be set by changing the [search.max_open_scroll_context] setting

And the sample query is

{"query":{"match":{"_id":"9d_2vnQBNC5655PQgWel"}},"script":{"inline":"ctx._source.pickups.0.geofence_id = params.pickups.0.geofence_id;ctx._source.pickups.0.name = params.pickups.0.name;ctx._source.pickups.0.address = params.pickups.0.address;ctx._source.pickups.0.consignee = params.pickups.0.consignee;ctx._source.pickups.0.contact_no = params.pickups.0.contact_no;ctx._source.pickups.0.location_details = params.pickups.0.location_details;ctx._source.pickups.0.status_code = params.pickups.0.status_code;ctx._source.pickups.0.status_code_id = params.pickups.0.status_code_id;ctx._source.pickups.0.issue = params.pickups.0.issue;ctx._source.pickups.0.eta = params.pickups.0.eta;ctx._source.pickups.0.actual_eta = params.pickups.0.actual_eta;ctx._source.pickups.0.so_number = params.pickups.0.so_number;ctx._source.pickups.0.geofence_code = params.pickups.0.geofence_code;ctx._source.pickups.0.is_late = params.pickups.0.is_late;ctx._source.pickups.0.arrival = params.pickups.0.arrival;ctx._source.pickups.0.actual_arrival = params.pickups.0.actual_arrival;ctx._source.pickups.0.departure = params.pickups.0.departure;ctx._source.pickups.0.eta_modified = params.pickups.0.eta_modified;ctx._source.dropoffs.0.geofence_id = params.dropoffs.0.geofence_id;ctx._source.dropoffs.0.name = params.dropoffs.0.name;ctx._source.dropoffs.0.address = params.dropoffs.0.address;ctx._source.dropoffs.0.consignee = params.dropoffs.0.consignee;ctx._source.dropoffs.0.contact_no = params.dropoffs.0.contact_no;ctx._source.dropoffs.0.location_details = params.dropoffs.0.location_details;ctx._source.dropoffs.0.status_code = params.dropoffs.0.status_code;ctx._source.dropoffs.0.status_code_id = params.dropoffs.0.status_code_id;ctx._source.dropoffs.0.issue = params.dropoffs.0.issue;ctx._source.dropoffs.0.eta = params.dropoffs.0.eta;ctx._source.dropoffs.0.actual_eta = params.dropoffs.0.actual_eta;ctx._source.dropoffs.0.so_number = params.dropoffs.0.so_number;ctx._source.dropoffs.0.geofence_code = params.dropoffs.0.geofence_code;ctx._source.dropoffs.0.is_late = params.dropoffs.0.is_late;ctx._source.dropoffs.0.arrival = params.dropoffs.0.arrival;ctx._source.dropoffs.0.departure = params.dropoffs.0.departure;ctx._source.dropoffs.0.eta_modified = params.dropoffs.0.eta_modified;ctx._source.status_code_id = params.status_code_id;ctx._source.status_code = params.status_code;ctx._source.is_late = params.is_late;ctx._source.modified = params.modified","params":{"pickups":[{"geofence_id":"uBLzvnQBCjwYLqSnrHvt","name":"qaGeofence1","address":"","consignee":"","contact_no":"","location_details":"test","status_code":"Scheduled","status_code_id":2,"issue":"","eta":"","actual_eta":"","so_number":"so0901018","geofence_code":"qageo1","is_late":0,"arrival":"2020-09-01 12:00:00","actual_arrival":"2020-09-24 00:10:00","departure":"2020-09-01 12:30:00","eta_modified":"Invalid date"}],"dropoffs":[{"geofence_id":"Nt_zvnQBNC5655PQrmNB","name":"qaGeofence3","address":"","consignee":"","contact_no":"","location_details":"test","status_code":"Scheduled","status_code_id":2,"issue":"","eta":"","actual_eta":"","so_number":"so0901018","geofence_code":"qageo3","is_late":0,"arrival":"2020-09-01 14:00:00","departure":"2020-09-01 15:00:00","eta_modified":"Invalid date"}],"status_code_id":"2","status_code":"Scheduled","is_late":0,"modified":"2020-11-19 03:57:07"}}}

Sorry I forgot to get the ES log.

Any idea anyone? Need to solve this since the app is deployed in prod already.

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