<@U088WCP3B4P> edr report seems to be consuming lo...
# ask-elementary-ai
c
@kapa.ai edr report seems to be consuming loads of memory. is there any way to tweak this?
k
A message from kapa.ai
Yes—there are a few levers you can use to reduce
edr report
memory usage. 1. Limit how much history is loaded (
--days-back
)
By default, reports pull about 7 days of data. Reducing this window is the most effective way to cut memory:
Copy code
bash edr report --days-back 1 ...
Users hitting OOM with
edr report
/
edr send-report
have resolved it by lowering
--days-back
from 7 to 3 or 1. [[OOM send-report](https://elementary-community.slack.com/archives/C02CTC89LAX/p1680534551722499); [Report size & OOM](https://elementary-community.slack.com/archives/C02CTC89LAX/p1721891343007629)] 2. Limit how many executions are processed (
--executions-limit
)
This caps how far back Elementary collects dbt/Elementary results per test when generating the report. Lowering it reduces data held in memory:
Copy code
bash edr report --executions-limit 100 ... # or even lower if needed
This has helped users avoid OOM when combined with a smaller
--days-back
. [[Exec limit usage](https://www.linen.dev/s/elementary-community/t/32740270/my-edr-report-command-has-started-hanging-and-not-outputting); [OOM mitigation](https://elementary-community.slack.com/archives/C02CTC89LAX/p1685079843099879)] 3. Disable passed test metrics If you don’t need metrics for passed tests, disabling them reduces the amount of data processed:
Copy code
bash edr report --disable-passed-test-metrics true ...
This is often used together with
--days-back
and
--executions-limit
to keep memory in check. [[Airflow tuning](https://www.linen.dev/s/elementary-community/t/32591502/u088wcp3b4p-i-have-the-following-command-that-keeps-on-faili)] 4. Combine the options A more conservative example:
Copy code
bash edr report \   --days-back 1 \   --executions-limit 50 \   --disable-passed-test-metrics true
5. As a last resort: more resources or version changes - Some users had to increase container/pod memory when reports grew large. [[Semaphore/memory discussion](https://elementary-community.slack.com/archives/C02CTC89LAX/p1678895828557069)] - Others temporarily pinned to an older Elementary version with lower memory usage, though this is not ideal long term. [[Version pinning & OOM](https://elementary-community.slack.com/archives/C02CTC89LAX/p1680534551722499)] If you share the exact command you’re running, I can suggest a tuned version with these flags applied.
c
what does
--executions-limit
does?
@kapa.ai what does
--executions-limit
does?
k
A message from kapa.ai
--executions-limit
controls how many historical executions (invocations) per test Elementary will load and show in the report. - It limits how far back Elementary collects dbt and Elementary results for each test when generating the report/alerts. [[CLI options](https://docs.elementary-data.com/oss/cli-commands#cli-options); [Timeout advice](https://elementary-community.slack.com/archives/C02CTC89LAX/p1691169511715969)] - The default is **720**; lowering it reduces: - The amount of data queried from your warehouse - Memory usage and report size - Time to generate the report It’s commonly used to fix timeouts/OOM by trying a much smaller value first, e.g.:
Copy code
bash edr report --executions-limit 10 ...
and then increasing gradually if that works. [[Timeout advice](https://elementary-community.slack.com/archives/C02CTC89LAX/p1691169511715969); [Report size tuning](https://elementary-community.slack.com/archives/C02CTC89LAX/p1697714006352379)]