Re: out of memory



Hi Tina,

Yes, it is possible to Manage to write your own custom Managed Memory leak.
Garbage Collection IS automatic, but unless you put your cans out on the
street, they will never get picked up. IOW, the purpose of Memory Management
and Garbage Collection is not to allow you more time to play Solitaire, but
to help you prevent your own forest fires, as Smokey the Bandit would say.
;-)

The first thing you need to do is to determine that you will, in the future,
take more responsibility for your code. As Fox Mulder would say, "Trust No
one" (not even content from Microsoft!). Or, as my old boss when I was a
carpenter in Skokie Indiana would say "Measure twice, cut once."

Second, let's have a look at some diagnostic tools and techniques. One thing
I might point out regarding why it may have worked so beautifully on your
machine is, when you start a project in Visual Studio for debugging, it
restarts the application, thereby wiping out all accumulated memory for that
application. If you didn't use Visual Studio, well, you probably didn't put
the app under any stress. For example, the Application will stop itself 20
minutes after the last client Request, and won't start again until the next.
A good practice is to put the app first on a staging server and then put it
under some stress over a long period of time. Microsoft Application Center
2000 is a free tool that you can download from Microsoft.com for testing ASP
and ASPO.net apps. It can put a simulated load on your app, enabling you to
see how it functions under stress.

Windows Taks Manager can be used to monitor memory and processor performance
easily while running your app. You can also set up Performance Counters in
your app for monitoring and/or recording various aspects of your app's
performance while running it.

Of course, logging is also an excellent tool to employ in your app for
debugging purposes of various types.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
What You Seek Is What You Get.


"Tina" <tinamseaburn@xxxxxxxxxxxxxxxxxxxx> wrote in message
news:uCmbp5wVFHA.2572@xxxxxxxxxxxxxxxxxxxxxxx
> My asp.net app that ran fine on my dev boxes is having problems at my web
> hoster who is running IIS 6. I'm getting Out of Memory exceptoions. When
> my web hoster bounces my app, the problem goes away for a couple of days.
> Sounds like I have a Memory Leak, but my application is managed and
> garbage collection is automatic, right?
>
> How can I track available memory and what kinds of tools are available to
> shoot this kind of problem?
> Thanks,
> T
>


.



Relevant Pages

  • Re: Article of interest: Python pros/cons for the enterprise
    ... from many articles and postings across the internet memory management ... There are other downsides to garbage collection, ... not the way it goes in practice nowadays, ...
    (comp.lang.python)
  • Re: out of memory
    ... I have connections, and IO streams, ... it is possible to Manage to write your own custom Managed Memory ... >> Management and Garbage Collection is not to allow you more time to play ... you probably didn't put the app under any stress. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Garbage collection "tutorials"
    ... Here are a couple of tutorials on garbage collection ... then in all likelihood the original app has ... system resources (such as memory, bitmaps, icons, etc). ...
    (microsoft.public.vb.winapi)
  • Re: MFC future?
    ... major desktop applications written in C#. I've only seen a couple in Java. ... > it's the memory management model used in environments like .NET and Java. ... > everything is managed by garbage collection the garbage collector ends up ...
    (microsoft.public.vc.mfc)
  • Re: out of memory
    ... do you have any practical information or know where to look regarding what ... IOW, the purpose of Memory ... > Management and Garbage Collection is not to allow you more time to play ... A good practice is to put the app first on a staging ...
    (microsoft.public.dotnet.framework.aspnet)