We recently had a sudden surge in open search contexts as a result of initiating many scrolls without iterating on them or closing them explicitly. Even though scroll time to live was set to 2 min we continued to have too many contexts errors for an additional 4 hours after the spike in scroll requests ceased.
In attempts to remediate the issue we restarted query nodes (no impact on open contexts), restarted our services (no impact on open contexts), and finally needed to clear scrolls by API call to ES. However my understanding is that these should have been cleared by ES after they expired (2 min after creation).
Is this a bug? Or does restarting the query node and not the data node have something to do with why the search contexts remained open after expiration? Thanks!