1

I am currently testing an application that receives 35 KB of data via TCP/IP and invokes a Work flow that has a code activity to write the data to a log file. The whole process is repeated every 100 milliseconds, but after a number of iterations the application hits "Out Of Memory Exception". I used perfmon to analyze if there is a memory leak , it seems that managed memory was leaking . I tried using a payload with data less than 35KB but the application was still giving me Out Of Memory Exception. To confirm if it was a memory leak (I was suspecting large fragmentation), I used Red Gate Ants memory profiler but this time I launched the application outside visual studio debugging environment strangely it didn't show any symptoms of memory leak and it ran continuously for half a million times.Can anyone explain me why this is happening ?

Is it safe to run tests in debugging mode ?

Nico Schertler
  • 32,049
  • 4
  • 39
  • 70
kiran
  • 1,062
  • 24
  • 31
  • see this http://stackoverflow.com/questions/14186256/net-out-of-memory-exception-used-1-3gb-but-have-16gb-installed – Anuj Jun 17 '13 at 09:46
  • only thought I have is that the runtime is being prevented from garbage collecting for some reason. It is possible to invoke the collector explicitly, so perhaps try that? – rivimey Jun 17 '13 at 10:24
  • @rivimey I tried gc.Collect(); after invoking the wf but the result was same. – kiran Jun 17 '13 at 10:31
  • 1
    This may help others who find this question. https://social.msdn.microsoft.com/Forums/vstudio/en-US/1af59645-cdef-46a9-9eb1-616661babf90 – 0b101010 Feb 09 '16 at 19:21

0 Answers0