-
Notifications
You must be signed in to change notification settings - Fork 697
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
Memory leak when selecting a large number of rows #1302
Comments
Interesting that you would label the ability to work with real life databases with more than a few thousand records in them without crashing due to running out of memory an "enhancement". |
I just guess from the reply of @Tapac here that it was supposed that cache would be used for "mostly dictionary-like" entities, which contain a rather limited amount of data. That's why it is an enhancement/new feature to make it possible to cache big amounts of data without requiring user to clear cache him/herself |
It may be "supposed" that caching would be used in certain scenarios but at the moment it's used everywhere and there's no way to disable it. That's what this issue is about. |
EntityCache.maxEntitiesToStore and DatabaseConfig.maxEntitiesToStoreInCachePerEntity params introduced
New |
EntityCache.maxEntitiesToStore and DatabaseConfig.maxEntitiesToStoreInCachePerEntity params introduced
Doing a simple
EntityClass.find
results in a memory leak (or perhaps more correctly bloat) when iterating through millions of records. The culprit isTransaction.entityCache
which only gets filled and never freed during the iteration. As a result I'm forced to use a workaround like:instead of the simple
There should be a way to disable the cache or configure its size so that it doesn't grow forever.
The text was updated successfully, but these errors were encountered: