Skip to content
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

Running multiple times aggregation queries on the main branch eventually generate memory limit errors #3503

Closed
fmassot opened this issue Jun 5, 2023 · 1 comment · Fixed by #3506
Labels
bug Something isn't working

Comments

@fmassot
Copy link
Contributor

fmassot commented Jun 5, 2023

On the github archive dataset, if I run several aggregations, the first runs will succeed but after several attempts, it generates the following errors:

Exception: ('Error while querying', '{\n  "message": "Internal error: `(Internal error: `Aborting aggregation because memory limit was exceeded. Limit: 1.00 GB, Current: 1.00 GB`., split_id: 01H26SCHJ2AR36YAXATXMSW4FW), (Internal error: `Aborting aggregation because memory limit was exceeded. Limit: 1.00 GB, Current: 1.00 GB`., split_id: 01H26SKYQVE5SQV08XSVDCK3XY), (Internal error: `Aborting aggregation because memory limit was exceeded. Limit: 1.00 GB, Current: 1.00 GB`., split_id: 01H26SV71BZGPT45364VPYEPY8), (Internal error: `Aborting aggregation because memory limit was exceeded. Limit: 1.00 GB, Current: 1.00 GB`., split_id: 01H26T2GZT54S7H4Q05XHM0NPN), (Internal error: `Aborting aggregation because memory limit was exceeded. Limit: 1.00 GB, Current: 1.00 GB`., split_id: 01H26T9Z9QNSQBQVNB066ZBT7Q), (Internal error: `Aborting aggregation because memory limit was exceeded. Limit: 1.00 GB, Current: 1.00 GB`., split_id: 01H26THAEMY8JS08A6ZNDZSJDG)`."\n}')

If I restart, the requests first succeed and then fail again.

Here are the queries I run:


{"tags":["search"], "query":{"query":"payload.description:the", "sort_by_field": "-created_at"}}
{"tags":["search", "timestamp_filter"], "query":{"query":"payload.description:the", "start_timestamp": 1421276400, "end_timestamp": 1421708400}}
{"tags":["search", "union"], "query":{"query":"payload.description:the OR payload.comment.body:the OR payload.issue.body:the"}}
{"tags":["search", "union", "timestamp_filter"], "query":{"query":"payload.description:the OR payload.comment.body:the OR payload.issue.body:the", "start_timestamp": 1421276400, "end_timestamp": 1421708400}}
{"tags":["search"],  "query":{"query":"payload.description:javascript OR payload.comment.body:javascript OR payload.issue.body:javascript"}}
{"tags":["search", "union"], "query":{"query":"payload.description:javascript OR payload.comment.body:javascript OR payload.issue.body:javascript"}}
{"tags":["search"], "query":{"query":"payload.description:rust"}}
{"tags":["search", "intersection"], "query":{"query":"payload.issue.body:rust AND payload.issue.body:bug"}}
{"tags":["search", "intersection", "timstamp_filter"], "query":{"query":"payload.issue.body:rust AND payload.issue.body:bug", "start_timestamp": 1421276400, "end_timestamp": 1421708400}}
{"tags":["search", "union"], "query":{"query":"payload.issue.body:error OR payload.issue.body:bug"}}
{"tags":["search", "union"], "query":{"query":"payload.description:rust OR payload.comment.body:rust OR payload.issue.body:rust"}}
{"tags":["search", "union", "timestamp_filter"], "query":{"query":"payload.description:rust OR payload.comment.body:rust OR payload.issue.body:rust", "start_timestamp": 1421276400, "end_timestamp": 1421708400}}
{"tags": ["aggregation"], "query":{"query":"*","max_hits":0,"aggs":{"top_repositories":{"terms":{"size":10,"field":"repo.name","order":{"_count":"desc"}}}}}}
{"tags": ["search", "aggregation"], "query":{"query":"payload.description:error","max_hits":0,"aggs":{"top_repositories":{"terms":{"size":10,"field":"repo.name","order":{"_count":"desc"}}}}}}
{"tags": ["aggregation", "timestamp_filter"], "query":{"query":"*","max_hits":0,"aggs":{"top_repositories":{"terms":{"size":10,"field":"repo.name","order":{"_count":"desc"}}}}, "start_timestamp": 1421276400, "end_timestamp": 1421708400}}
{"tags": ["aggregation", "date_histogram"], "query":{"query":"*","max_hits":0,"aggs":{"events":{"date_histogram":{"field":"created_at","fixed_interval":"1d"},"aggs":{"top_repositories":{"terms":{"size":10,"field":"repo.name","order":{"_count":"desc"}}}}}}}}
{"tags": ["search", "aggregation", "date_histogram"], "query":{"query":"payload.description:error","max_hits":0,"aggs":{"events":{"date_histogram":{"field":"created_at","fixed_interval":"1d"},"aggs":{"top_repositories":{"terms":{"size":10,"field":"repo.name","order":{"_count":"desc"}}}}}}}}

@fmassot fmassot added the bug Something isn't working label Jun 5, 2023
@fulmicoton
Copy link
Contributor

fulmicoton commented Jun 6, 2023

Dataset
https://quickwit-datasets-public.s3.amazonaws.com/benchmarks/gharchive.json.gz

version: 0.5
index_id: gharchive

doc_mapping:
  mode: dynamic
  dynamic_mapping:
    fast: true
  field_mappings:
    - name: created_at
      type: datetime
      precision: seconds
      fast: true
  timestamp_field: created_at

indexing_settings:
  split_num_docs_target: 2000000

PSeitz added a commit that referenced this issue Jun 6, 2023
#3305 added a shared AggregationLimits on SearcherContext, but AggregationLimits tracks the memory itself and should not be shared.
closes #3503
PSeitz added a commit that referenced this issue Jun 6, 2023
* remove shared AggregationLimits

#3305 added a shared AggregationLimits on SearcherContext, but AggregationLimits tracks the memory itself and should not be shared.
closes #3503

* update agg limit docs
PSeitz added a commit to quickwit-oss/tantivy that referenced this issue Jun 6, 2023
small docs improvement as follow up on bug quickwit-oss/quickwit#3503
fulmicoton pushed a commit to quickwit-oss/tantivy that referenced this issue Jun 12, 2023
small docs improvement as follow up on bug quickwit-oss/quickwit#3503
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants