<@U088WCP3B4P> My elementary container is really h...
# ask-elementary-ai
d
@kapa.ai My elementary container is really heavy in terms of RAM, how can I fix that ?
k
A message from kapa.ai
High memory (RAM) usage by the Elementary container is a known issue, especially when generating reports with a large amount of historical data or in projects with many models and tests. Here are several approaches, based on community experience and support recommendations, to help reduce memory consumption: 1. Limit the Data Range with
--days-back
By default, Elementary processes data from the last 7 days. Reducing this window can significantly decrease memory usage. For example, try running your command with
--days-back 3
or even `--days-back 1`:
Copy code
edr report --days-back 3 ...
This approach has helped many users resolve OOM (out-of-memory) errors, especially in CI/CD and Kubernetes environments [Slack thread](https://slack.com/archives/C02CTC89LAX/p1685079843099879), [Slack thread](https://slack.com/archives/C02CTC89LAX/p1680534551722499). 2. Increase Container Memory If possible, allocate more memory to your container or pod. Users have reported needing to increase from 4GB to 8GB, or even higher, depending on project size [Slack thread](https://slack.com/archives/C02CTC89LAX/p1706131493899439), [Slack thread](https://slack.com/archives/C02CTC89LAX/p1707130891842569). 3. Reduce the Number of Test Results Processed Use additional CLI parameters like
--executions-limit
or
--disable-passed-test-metrics
to further limit the data loaded into memory:
Copy code
edr report --days-back 3 --executions-limit 100 --disable-passed-test-metrics True ...
This can help if you have a very large number of test results [Slack thread](https://slack.com/archives/C02CTC89LAX/p1674656787251049). 4. Pin to an Older Version (as a Last Resort) Some users have found that older versions of Elementary (e.g., v0.6.5) use less memory, though this is not ideal for long-term support [GitHub issue](https://github.com/elementary-data/elementary/issues/761). 5. Monitor and Clean Up Elementary Tables If your Elementary tables (like
elementary_test_results
) are very large, consider archiving or cleaning up old data, as excessive table size can contribute to high memory usage [Slack thread](https://slack.com/archives/C02CTC89LAX/p1674656787251049). Summary: Start by reducing the
--days-back
parameter and, if possible, increase your container's memory allocation. If issues persist, try limiting executions or disabling passed test metrics. If none of these work, consider downgrading to an older Elementary version as a temporary workaround. The Elementary team is aware of these issues and is working on improvements [GitHub issue](https://github.com/elementary-data/elementary/issues/761). If you need more tailored advice, sharing your
edr.log
file and details about your environment with the Elementary support team can help diagnose specific issues.