Too many scroll contexts with _update_by_query and/or _delete_by_query


I've had an issue recently in my Elasticsearch cluster of getting this error:

Trying to create too many scroll contexts. Must be less than or equal to: [500]

None of our _search queries use that feature, but I have just discovered that _update_by_query and _delete_by_query do, with a default window of 5 minutes. There may be a bug in our code which results in them being called too frequently, but I was wondering if anybody knew of the danger of setting that to a low value (say 5 seconds?). Given that it doesn't return the scroll_id, I assume the scroll context is only used for the duration of the _update or _delete?

Equally, is it valid to set it to 0s? I tested it and it did perform the update, but I'm not sure if it just ignored the value?