OutOfMemoryException with Framework 2.0, while app works fine with 1.1

D

DC

Hi,

I am using a windows serivce that allocates large data arrays. The
service already functions fine for years with framework 1.1.

With 1.1, the service is using about 1.1 to 1.3 GB of physical memory,
and task manager reports 1.3 to 1.6 GB of virtual memory (I know so
little about memory management that I cannot tell if the virtual memory
is actually including the physical memory shown...). The used memory
increases by about 100 - 300 MB quiet suddenly, but will then relax and
decrese by 100 - 300 MB again.

The machine is a 2 CPU 2 GB box.

When I run the service on the same machine but compiled with VS 2005
SP1 (after running the upgrade wizard) and using framwork 2.0, the
physical memory usage will go up to about 1.4 GB and the virtual memory
to 1.7 GB and then the service will report permanent
OutOfMemoryExceptions and basically cease functioning.

Why is that? I already moved to a machine with 2 GB of Ram while
previously the service was running fine with 1.5 GB memory. With both
machines the 1.1 version is OK, the 2.0 version bombs.

I did stupid stuff like changing the machine.config

<system.web>
<processModel
autoConfig="true"
memoryLimit="80"
/>
...

but certainly this memory limit only accounts for ASP.Net. (BTW: does
someone know if it is OK to combine the autoConfig attribute with some
individual settings?)

Does someone have a meaningful troubleshooting idea for me? I don't
want this service on 1.1 forever.

Thank you for any hint in advance! Regards
DC
 
M

Michael Nemtsev

Hello DC,

Did u tried to profile your app to understand why u got this exception?!

I'd suggest you to profile carefully to find out where the GC rize without
proper collecting resources.
If this doent help - scrutinizing the dumps with the Windbg and sos.dll is
the solution

---
WBR,
Michael Nemtsev [C# MVP] :: blog: http://spaces.live.com/laflour

"The greatest danger for most of us is not that our aim is too high and we
miss it, but that it is too low and we reach it" (c) Michelangelo

D> Hi,
D>
D> I am using a windows serivce that allocates large data arrays. The
D> service already functions fine for years with framework 1.1.
D>
D> With 1.1, the service is using about 1.1 to 1.3 GB of physical
D> memory, and task manager reports 1.3 to 1.6 GB of virtual memory (I
D> know so little about memory management that I cannot tell if the
D> virtual memory is actually including the physical memory shown...).
D> The used memory increases by about 100 - 300 MB quiet suddenly, but
D> will then relax and decrese by 100 - 300 MB again.
D>
D> The machine is a 2 CPU 2 GB box.
D>
D> When I run the service on the same machine but compiled with VS 2005
D> SP1 (after running the upgrade wizard) and using framwork 2.0, the
D> physical memory usage will go up to about 1.4 GB and the virtual
D> memory to 1.7 GB and then the service will report permanent
D> OutOfMemoryExceptions and basically cease functioning.
D>
D> Why is that? I already moved to a machine with 2 GB of Ram while
D> previously the service was running fine with 1.5 GB memory. With both
D> machines the 1.1 version is OK, the 2.0 version bombs.
D>
D> I did stupid stuff like changing the machine.config
D>
D> <system.web>
D> <processModel
D> autoConfig="true"
D> memoryLimit="80"
D> />
D> ...
D> but certainly this memory limit only accounts for ASP.Net. (BTW: does
D> someone know if it is OK to combine the autoConfig attribute with
D> some individual settings?)
D>
D> Does someone have a meaningful troubleshooting idea for me? I don't
D> want this service on 1.1 forever.
D>
D> Thank you for any hint in advance! Regards
D> D
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top