简体   繁体   中英

ASP.NET memory problem

I have an ASP.NET application that communicates with another API and processes a lot on Page_Load.

If in my browser I hold F5 and hit the site, the server shoots from 120mb to 1.5GB.

I can't find any memory leaks or unclosed objects. Is there any way or extra things I can do to help?

Thank you for your time!

Use a profiler like ANTS Profiler or dotTrace .

There are many, many things that could cause that behavior - trying to solve the problem with arbitrary suggestions probably won't get us anywhere.

Once the profiler has identified problem areas, you can post that code in a new question if you aren't able to resolve that problem.

For what it's worth, 1.5 GB isn't huge . Does it eventually give an OutOfMemoryException if you keep the button pressed?

I would suggest looking into ANTS Memory Profiler and/or ANTS Performance Profiler from Red Gate. They're very affordable, and they do a great job of identifying bottlenecks.

ANTS Memory Profiler:
http://www.red-gate.com/products/dotnet-development/ants-memory-profiler/

ANTS Performance Profiler:
http://www.red-gate.com/products/dotnet-development/ants-performance-profiler/

+1 to "profile and figure out problems" - knowing what is happening is must if you want to solve the issue.

But in short term it may be cheaper and easier to move to decent 64 bit box/64 bit version of Windows and use 64 bit ASP.Net - you'll get much more memory available to IIS process.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM