Out of Memory Exception Help
I have a wpf application that is generating Out of Memory exceptions after running for long period of time (~500 hours runtime) and I am struggling to really pin down the issue. I was wondering if there were any insight or resources I could be directed to for this issue. I use ANTS Memory Profiler to check memory usage and can't see a runaway leak of memory usage. I'm not the best at using it, so might be my fault at not catching it. Would love if someone could at least set me on the path of learning more about this. Currently the used project are set to a Platform target of x86, wondering if setting those to Any CPU without preferring 32-bit would help or just setting to x64. I'm also seeing the largest Live sizes being strings, so might look to optimize some of the way logs are being generated for the app. I also have cases where the logs are written to files for later ingestion on app restart that might be causes issues as it loads the whole file to parse, but honestly sort of lost. IF anyone has insight, I would really love it 😅
3 Replies
so you mean memory is not growing but exception is not predictable
In your app did you have any
static
variable/property that its value get increased from time to other ??in 189 hours on the profiler, the total size of objects has increased by 19.4MBs There is a steady growth. But it's really slow and also probably because there are limits to some of the logging (5000 items or so)
The application is quite large, but would there be a way to identify this in a memory profiler?