-
Notifications
You must be signed in to change notification settings - Fork 25k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add safeguards to prevent simple user errors #11511
Comments
I'm wondering if we should do it per index or per cluster. If we do it per index, then we might also want to have a max number of indices per cluster.
I guess it would also apply to multi-get and multi-search. |
Some of this could go into a "sanity checker"-kind of plugin akin to the migration plugin that runs a bunch of tests as well. That one could warn when e.g. minimum master nodes looks wrong, and when the number of shards/indexes/fields looks silly / approaches the above limits. |
@alexbrasetvik the requires the user to actually run the check. Often poor sysadmins are at the mercy of their users. What I'd like to do is to prevent users from blowing things up by mistake. |
@clintongormley Agreed! I still think there's room for both, though such a tool should be another issue. For example, a high number of indexes with few documents and identical mappings can be a sign that the user is doing per-user index partitioning when he shouldn't. That will turn into a problem, even if the current values are far from hitting above mentioned limits. |
|
This is already available with the thread pools and queue_sizes to limit the number of requests per-node and apply backpressure. EDIT: I guess I am taking "size" as "count", is that what you mean? |
@dakrone Size of an actual request. For instance, if one request comes in with an aggregation that uses |
Another protection to add: check mapping depth #14370 |
Limit the max value that can be set for queue_size for our search, bulk, index, etc.. thread pools so users can't set them to unlimited, millions, etc..? |
@clintongormley I think we missed one rather important aspect when it comes to soft-limits. Today the user can override those limits via dynamic properties which is ok most of the time but in the case of a cloud hosting infrastructure where the org that runs the infrastructure needs to have full control over these limits they should be able to disable the dynamic property or should disable setting these settings entirely? |
This change adds a dynamic cluster setting named `search.max_keep_alive`. It is used as an upper limit for scroll expiry time in scroll queries and defaults to 1 hour. This change also ensures that the existing setting `search.default_keep_alive` is always smaller than `search.max_keep_alive`. Relates elastic#11511
This change adds a dynamic cluster setting named `search.max_keep_alive`. It is used as an upper limit for scroll expiry time in scroll queries and defaults to 1 hour. This change also ensures that the existing setting `search.default_keep_alive` is always smaller than `search.max_keep_alive`. Relates #11511 * check style * add skip for bwc * iter * Add a maxium throttle wait time of 1h for reindex * review * remove empty line
This change adds a dynamic cluster setting named `search.max_keep_alive`. It is used as an upper limit for scroll expiry time in scroll queries and defaults to 1 hour. This change also ensures that the existing setting `search.default_keep_alive` is always smaller than `search.max_keep_alive`. Relates #11511 * check style * add skip for bwc * iter * Add a maxium throttle wait time of 1h for reindex * review * remove empty line
Most of the work has been done, and items that have not been done have an assigned issue so I'll close this issue. Thanks everyone! |
There are a number of places where a naive user can break Elasticsearch very easily. We should add more (dynamically overridable) safeguards that prevent users from hurting themselves.
Note:
policy.
to make them easier to document together and to understand their purpose.Accepted limits:
from
/size
Add a maximum search request size. #26423 Don't allow search requests greater than (eg) 10MB (Adrien)nested
fields per index to 50 (Yannick)window_size
in rescore API (@nik9000)_source
by default #17558 Disable script access to_source
fields by defaultfrom
/size
in top hits and inner hits (much smaller than a normal query) (MVG)scroll
expiry time (Jim)For discussion:
Kill slow scripts when search timeout has lapsed aka while(true) should not require a rolling restart to recover fromDon't run a script a second time when the first execution takes longer than 1 secondDisable searching across all indices #6470 Disable searching on all indices by defaultHandled by max number of shardsAny other ideas?
The text was updated successfully, but these errors were encountered: