Out of memory when having lot of memory!

Discussion in 'ASP .Net' started by jmr, Nov 22, 2007.

  1. jmr

    jmr Guest

    Hi All,

    Our aspnet application is randomly thrown this exception:
    System.OutOfMemoryException

    It only happens on our bigger 2003 server (4GB of ram!)

    I've found this on Microsoft site:
    http://support.microsoft.com/kb/820108

    This could be our problem but how to be sure ?
    To be honest, I'm a bit nervous changing the boot.ini on a remote server.

    Has someone already applied this /3GB stuff in boot.ini.

    Thanks for any feedback,
    Jean-Michel
     
    jmr, Nov 22, 2007
    #1
    1. Advertisements

  2. jmr

    chris Guest

    You might have a memory leak.
    Read http://www.codeproject.com/showcase/IfOnlyWedUsedANTSProfiler.asp
    for a classic (costly) example as to how handlers can cause leaks.
     
    chris, Nov 22, 2007
    #2
    1. Advertisements

  3. jmr

    jmr Guest

    And what about the microsoft document about this problem ?
    I don't want to waste time profiling if it is a microsoft bug.
    Also, why should I have a memory leak on a 4GB server and not on a 2GB one ?

    Jean-Michel
     
    jmr, Nov 22, 2007
    #3
  4. jmr

    bruce barker Guest

    the microsoft article is about the 3gb switch. normally a process can
    only access 2gb of memory. the article you give allows modification of
    nt to allow 3gb of memory. the 3gb switch limits the amount of memory
    the os has access t0 (1gb), so you should only do this on a server thats
    dedicated to one application, or nt might get out of memory errors.

    a normal website should not be using 2gb of memory, unless there is a
    memory leak, which is probably your problem.

    -- bruce (sqlwork.com)
     
    bruce barker, Nov 22, 2007
    #4
  5. Hello jmr,

    the problem lays in the nature of CLR memory management.
    The keyword is that memory MAY be fragmented.
    As u may know memory is reserved in blocks 32/64mb, and when your app request
    another 10kb, CLR might don't find enough place in fragmented memory to reserve
    another block

    just to google and u find some mine post where i described this
    http://www.google.com/search?hl=en&...sult&cd=1&q=nemtsev+fragmented+memory&spell=1

    ---
    WBR,
    Michael Nemtsev [.NET/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


    j> Hi All,
    j>
    j> Our aspnet application is randomly thrown this exception:
    j> System.OutOfMemoryException
    j>
    j> It only happens on our bigger 2003 server (4GB of ram!)
    j>
    j> I've found this on Microsoft site:
    j> http://support.microsoft.com/kb/820108
    j> This could be our problem but how to be sure ?
    j> To be honest, I'm a bit nervous changing the boot.ini on a remote
    j> server.
    j> Has someone already applied this /3GB stuff in boot.ini.
    j>
    j> Thanks for any feedback,
    j> Jean-Michel
     
    Michael Nemtsev [MVP], Nov 23, 2007
    #5
  6. jmr

    jmr Guest

    Thanks for the answer.
    So you if you want to develop a "non normal" website needing more
    memory, you cannot just buy memory and put it into your box because
    windows limitations !

    Also, about memory leaks, some ASP.NET announces says it should not be a
    problem:
    ASP.NET ensures that your application is always available to your users.
    * Memory Leak, DeadLock and Crash Protection. ASP.NET
    automatically detects and recovers from errors like deadlocks and memory
    leaks to ensure your application is always available to your users.

    I must say I'm a bit disapointed.

    Jean-Michel
     
    jmr, Nov 23, 2007
    #6
    1. Advertisements

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 (here). After that, you can post your question and our members will help you out.