-
Notifications
You must be signed in to change notification settings - Fork 999
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
'@log_exceptions_and_usage' in Python seems have memory leaks #3269
Comments
Hi! Thanks for reporting this Any chance you could get a heap dump after a bit to see what might be leaking? |
Hi @adchia , Thanks for the reply! Today I am using 'tracemalloc' to take snapshot of the memory usage every 30 seconds, and found below summary: It seems the memory is increasing because of the '@log_exceptions_and_usage' decorator on 'write_to_online_store'. Is it possible to skip or turn off this '@log_exceptions_and_usage'? INFO - Top diff since start: |
Yep! There's an environment variable you can set (See https://docs.feast.dev/reference/usage) |
Thanks for investigating, will rename this issue then |
Expected Behavior
The app which is using 'write_to_online_store' consumes memory in a stable way.
Current Behavior
The memory consumed by the app which is using 'write_to_online_store' keeps growing. (See further comments that point to usage.py being the cause)
Steps to reproduce
The App is based on FastApi, which receives data with a throughput 2-3 req/s. The App creates dataframe from the data posted by client, which has around 10 features, and then writes these features to the online store with the function 'write_to_online_store'.
We can observe the memory consumption of the App keeps growing, and its writing time also keeps growing.
The online store is based on Postgresql.
We also saves raw data to Postgresql with psycopg2, which acts as the offline store, its memory consumption and writing time is quite stable. (we have tried to only use psycopg2 to write to Postgresql, and no 'write_to_online_store', to check App's memory consumption situation)
Specifications
Version:
Feast 0.22.2
Python 3.7
Platform:
kubernetes
Subsystem:
Possible Solution
The text was updated successfully, but these errors were encountered: