{"action":"created","issue":{"url":"https://api.github.com/repos/influxdata/influxdb/issues/6024","repository_url":"https://api.github.com/repos/influxdata/influxdb","labels_url":"https://api.github.com/repos/influxdata/influxdb/issues/6024/labels{/name}","comments_url":"https://api.github.com/repos/influxdata/influxdb/issues/6024/comments","events_url":"https://api.github.com/repos/influxdata/influxdb/issues/6024/events","html_url":"https://github.com/influxdata/influxdb/issues/6024","id":141167244,"number":6024,"title":"Query Limits","user":{"login":"jwilder","id":219935,"avatar_url":"https://avatars.githubusercontent.com/u/219935?v=3","gravatar_id":"","url":"https://api.github.com/users/jwilder","html_url":"https://github.com/jwilder","followers_url":"https://api.github.com/users/jwilder/followers","following_url":"https://api.github.com/users/jwilder/following{/other_user}","gists_url":"https://api.github.com/users/jwilder/gists{/gist_id}","starred_url":"https://api.github.com/users/jwilder/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jwilder/subscriptions","organizations_url":"https://api.github.com/users/jwilder/orgs","repos_url":"https://api.github.com/users/jwilder/repos","events_url":"https://api.github.com/users/jwilder/events{/privacy}","received_events_url":"https://api.github.com/users/jwilder/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/influxdata/influxdb/labels/category/queries","name":"category/queries","color":"5319e7"}],"state":"open","locked":false,"assignee":{"login":"benbjohnson","id":118015,"avatar_url":"https://avatars.githubusercontent.com/u/118015?v=3","gravatar_id":"","url":"https://api.github.com/users/benbjohnson","html_url":"https://github.com/benbjohnson","followers_url":"https://api.github.com/users/benbjohnson/followers","following_url":"https://api.github.com/users/benbjohnson/following{/other_user}","gists_url":"https://api.github.com/users/benbjohnson/gists{/gist_id}","starred_url":"https://api.github.com/users/benbjohnson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/benbjohnson/subscriptions","organizations_url":"https://api.github.com/users/benbjohnson/orgs","repos_url":"https://api.github.com/users/benbjohnson/repos","events_url":"https://api.github.com/users/benbjohnson/events{/privacy}","received_events_url":"https://api.github.com/users/benbjohnson/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/influxdata/influxdb/milestones/47","html_url":"https://github.com/influxdata/influxdb/milestones/0.12.0","labels_url":"https://api.github.com/repos/influxdata/influxdb/milestones/47/labels","id":1586959,"number":47,"title":"0.12.0","description":null,"creator":{"login":"jsternberg","id":1212129,"avatar_url":"https://avatars.githubusercontent.com/u/1212129?v=3","gravatar_id":"","url":"https://api.github.com/users/jsternberg","html_url":"https://github.com/jsternberg","followers_url":"https://api.github.com/users/jsternberg/followers","following_url":"https://api.github.com/users/jsternberg/following{/other_user}","gists_url":"https://api.github.com/users/jsternberg/gists{/gist_id}","starred_url":"https://api.github.com/users/jsternberg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jsternberg/subscriptions","organizations_url":"https://api.github.com/users/jsternberg/orgs","repos_url":"https://api.github.com/users/jsternberg/repos","events_url":"https://api.github.com/users/jsternberg/events{/privacy}","received_events_url":"https://api.github.com/users/jsternberg/received_events","type":"User","site_admin":false},"open_issues":20,"closed_issues":8,"state":"open","created_at":"2016-02-16T21:27:28Z","updated_at":"2016-03-17T16:47:21Z","due_on":null,"closed_at":null},"comments":7,"created_at":"2016-03-16T04:07:27Z","updated_at":"2016-03-20T00:27:44Z","closed_at":null,"body":"There is currently no way for an administrator to prevent bad queries from overloading the system or OOMing the process.  The database should have some configurable options to specify limits on queries and automatically kill them before they consume too many resources.\r\n\r\nThe following limits may be useful:\r\n\r\n* Number of series - Kill queries that would access too many series at once\r\n* Number of points - Kill queries that access to many point\r\n* Max group by buckets - Prevent queries that would create too many buckets (e.g. `group by time(1s)` over 1y of points)\r\n* Max concurrent queries - Limit the number of concurrent queries that can be run at once\r\n* Max memory - Kill queries that allocate more than certain amount of RAM\r\n* Max query time - Kill queries that run for longer than a certain duration\r\n\r\nSome of these could return an error at query planning time (series count) and others may not be possible until the the limit is hit while running the query (point count).  \r\n\r\nMay depend on #5950 "},"comment":{"url":"https://api.github.com/repos/influxdata/influxdb/issues/comments/198814613","html_url":"https://github.com/influxdata/influxdb/issues/6024#issuecomment-198814613","issue_url":"https://api.github.com/repos/influxdata/influxdb/issues/6024","id":198814613,"user":{"login":"steverweber","id":1800619,"avatar_url":"https://avatars.githubusercontent.com/u/1800619?v=3","gravatar_id":"","url":"https://api.github.com/users/steverweber","html_url":"https://github.com/steverweber","followers_url":"https://api.github.com/users/steverweber/followers","following_url":"https://api.github.com/users/steverweber/following{/other_user}","gists_url":"https://api.github.com/users/steverweber/gists{/gist_id}","starred_url":"https://api.github.com/users/steverweber/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/steverweber/subscriptions","organizations_url":"https://api.github.com/users/steverweber/orgs","repos_url":"https://api.github.com/users/steverweber/repos","events_url":"https://api.github.com/users/steverweber/events{/privacy}","received_events_url":"https://api.github.com/users/steverweber/received_events","type":"User","site_admin":false},"created_at":"2016-03-20T00:27:44Z","updated_at":"2016-03-20T00:27:44Z","body":"I personal consider `Max query time` the most important of the proposed limits.\r\nWould be nice to set a default on a database and override per query.\r\n\r\ndefault on a database would resolve:\r\n > noobs using grafana and zooming out to view to much data , causing crashes.\r\n\r\nper query:\r\n > power users will need to override the database limit for large queries.\r\n"}}