1

getting:

aspnet_wp.exe  (PID: 988) was recycled because memory consumption exceeded the 148 MB (60 percent of available RAM).

any suggestion of web.config etc optimization? did already all the debug/release compile stuff. but still it takes to fast to much memory. machine got 256mbs ram, on 512mb it runs smooth. want to squeeze it down as much as possible. within code it did also as much to keep memory low, but it kind of 50mb data only. this must be possible. or does the framework need so much?

4
  • 2
    Why are you trying to fit ASP.Net into such a small amount of memory? Commented Jan 14, 2010 at 22:36
  • USB Stick Size Embedded System ;-) If this runs on kind of platform. I quess it boosts on the real machines xCore in serval VMs. Commented Jan 14, 2010 at 22:40
  • 1
    There are some places ASP.Net is not designed to go... Commented Jan 14, 2010 at 22:42
  • so you say 256mb is below minimum requirements? without even haven't tried it? Commented Jan 14, 2010 at 22:44

3 Answers 3

2

You can try de-configuring all of the HttpModules that you don't use. Windows Authentication, for example, is a common one.

You might also take a look at any static variables that you're allocating.

Disabling ViewState on as many pages as possible might help a little.

Minimize or eliminate any extra DLLs that get loaded (from your bin directory or the GAC).

However, it's unlikely that you'll save much memory by hunting-and-pecking like that. If you're serious about chasing it down, you'll need a memory profiler tool, such as .NET Memory Profiler from SciTech. They have a free two week trial.

Sign up to request clarification or add additional context in comments.

1 Comment

of course, momory profiler. i totally forgot. I try this first. Cut HttpModules down or Dlls may give a bit memory but to risky what it can cause.
1

Well, it should fit, but it depends on what you're doing with it, and which version of IIS you're running.

Optimizing Memory Usage (IIS 6.0)

Servers running IIS 6.0 benefit from ample physical memory. Generally, the more memory that you add, the more the servers use and the better they perform. IIS 6.0 requires a minimum of 128 MB of memory; at least 256 MB is recommended. If you are running memory-intensive applications, your server might require much more memory to run optimally — more than the recommended 256 MB of memory.

IIS 7.0 however has somewhat larger requirements:

  • Minimum: 512 MB
  • Recommended: 2 GB or more

That article has a few other recommendations on optimisations you can carry out, I'd also recommend Tess Ferrandez's blog, especially her post ".NET Memory usage - A restaurant analogy" which explains memory allocation nicely, and her other posts on debugging memory usage - which start in a similar place to RickNZ's suggestions.

1 Comment

thanks for all the info, to all of you. i could get my application by serializing on disk, keep only basic routines in memory. it works. but disk access means bad performance. so i'll try all the other suggestion which make sense and does not affect speed nor functionality. but at least it could work.
0

What are you putting in memory?

256mb is way below what a server would have, even if it was shared server you'd likely have more space to work with than that.

Are you caching?

What OS are you running?

Like RickNZ said trimming as much fat out as you can might save you some memory.

Honestly I think you simply have an unrealistic memory target.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.