DO.Net 4.3 RC2 seems to contain a small memory leak. (Not tested on other versions) Here is a test project: [attachment=0:35ctcl8e]TestLeak.zip[/attachment:35ctcl8e] I'm doing in a loop a very simple query and I execute GC.Collect() every 100 calls to get a smooth memory usage curve.
Memory usage (Private bytes) * after start : 55Mo * 1 hour later : 160 Mo * 2h10 later : 280 Mo * 3h40 later : 450 Mo The rise is slow, but noticeable as our application runs as a service. This thread was imported from our support forum. The original discussion may contain more detailed answer. |
To be checked ASAP. It looks like there is really something wrong, since in v4.3 we intentionally reduced cache sizes so that most of DO4 Domains shouldn't use >256Mb of RAM. Moreover, in your case RAM is constantly consumed on pretty simple task executed repeatedly, so there is almost 100% some leak. The bug is found: our implementation of weak reference-based cache never cleans up its internal dictionary, if AddNewItem/GetExistingItem operation ratio is (in average) higher then certain number. Or, shortly, if most of requests lead to addition of items to this cache, it starts to waste RAM, because its internal dictionary is always growing. We'll fix the issue today, so most likely, updated DO installers will be published on this weekend or on Monday. Issue created: http://code.google.com/p/dataobjectsdot ... ail?id=677 |