OutOfMemoryException when a lot of memory is available

后端 未结 10 1207
悲哀的现实
悲哀的现实 2021-02-19 03:38

We have an application that is running on 5 (server) nodes (16 cores, 128 GB Memory each) that loads almost 70 GB data on each machine. This application is distributed and serve

10条回答
  •  执念已碎
    2021-02-19 04:31

    I suggest that using ADPlus or other tools to get dump of your process when this exception occurs.Using this dump, you can debug your dump file using WinDbg. All of the below commands are taken from blog post Investigating ASP.Net Memory Dumps for Idiots (like Me).

    Investigating memory leaks

    In order to get a view on memory, we need to use the following command

    !dumpheap
    

    "dumpheap" command will give you object counts and memory usage of objects. Then you can investigate which object types uses most of your memory.

    !dumpheap -type System.IO.MemoryStream
    

    "dumpheap -type" command will list all of the objects on the heap that are of type MemoryStream. Good thing about WinDbg is you can investigate Unmanaged Memory Leaks: Example 1 and Example2.

提交回复
热议问题