Auto kill long running queries from user (not application)

Some users are running heavy query in production and it is impacting application. How can we auto kill long running queries from users (not from application user)?

Set a request timeout to have requests automatically terminated after some time. Be aware though that this is asynchronous so requests may run on for a bit after the timeout has expired. (i.e. It depends on the operation underway when a routine working on behalf of a request actually terminates).

See “queryTimeout” here:

You can set it at a node-level but this would impact all requests, including those from the application.

There isn’t a “per user” setting (there are no “per user” settings; only cluster, node or request levels).

This of course doesn’t limit the resources used whilst running within the permitted time limit. You can constrain document memory with a memory_quota setting. (See “queryMemoryQuota” here

You can manually cancel individual queries via the UI ( or by deleting the appropriate entry from system:active_requests or the admin REST endpoint (