-
Notifications
You must be signed in to change notification settings - Fork 0
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
Abnormally high memory usage in mainframe on staging #311
Comments
SQLAlchemy's identity map would be collected as soon as the session was closed, so I don't think my original guess is correct. I also found https://docs.pydantic.dev/latest/concepts/json/#caching-strings, but by quick estimation a completely full cache with 63 character strings would be at most 2 MiB. Also, when attempting to increase the memory usage by requesting a large time span with |
After some investigation, it doesn't seem like this issue is necessarily introduced by this PR. I've run memray against the main branch, then requested A good chunk of memory is still being hung onto |
I believe the culprit here is Pydantic. because of this i am putting switching to msgspec on the table, maybe we can do a trial period where we test it out on staging and see how it performs while monitoring memory usage |
Prod mainframe uses ~100MiB while staging uses ~250MiB. I suspect this is due to SQLAlchemy caching the
distributions
field that was recently added.The text was updated successfully, but these errors were encountered: