473,385 Members | 2,003 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

ASP.NET - Detecting memory leaks

How would I go about detecting a memory leak? My web hosting provider has
our site set up to only have a root "bin" folder for .NET apps, and I would
like to be able to watch how much memory is being allocated for the entire
site (since the site acts as one big application.) Is there anyway to do
this through code?

The reason I ask is because occasionally, our site will start having session
state loss. After a day or two, it goes back to normal. My session
timeouts are 20 minutes, and I try to make sure that I properly
destroy/deallocate my variables (I also use GC.Collect heavily in my apps to
catch anything that I didn't notice.)
Nov 18 '05 #1
2 1652
if you use 2003, you can setup a seperate pool for an application, and
monitor its memory usage. you can also download the win32 debugger and
instal the sos package. this will allow you to dump the gc.

you need to look for managed and unmanged leaks. managed leaks are generally
due to storing data in statics.

-- bruce (sqlwork.com)

"ASP.Confused" <anonymous@> wrote in message
news:en*************@TK2MSFTNGP10.phx.gbl...
How would I go about detecting a memory leak? My web hosting provider has
our site set up to only have a root "bin" folder for .NET apps, and I would like to be able to watch how much memory is being allocated for the entire
site (since the site acts as one big application.) Is there anyway to do
this through code?

The reason I ask is because occasionally, our site will start having session state loss. After a day or two, it goes back to normal. My session
timeouts are 20 minutes, and I try to make sure that I properly
destroy/deallocate my variables (I also use GC.Collect heavily in my apps to catch anything that I didn't notice.)

Nov 18 '05 #2
I don't know about the memory leaks, but you are properly killing your
performance if you are calling GC.Collect all the time. Microsoft does not
recommend that you call this yourself - especially often.

"ASP.Confused" <anonymous@> wrote in message
news:en*************@TK2MSFTNGP10.phx.gbl...
How would I go about detecting a memory leak? My web hosting provider has
our site set up to only have a root "bin" folder for .NET apps, and I would like to be able to watch how much memory is being allocated for the entire
site (since the site acts as one big application.) Is there anyway to do
this through code?

The reason I ask is because occasionally, our site will start having session state loss. After a day or two, it goes back to normal. My session
timeouts are 20 minutes, and I try to make sure that I properly
destroy/deallocate my variables (I also use GC.Collect heavily in my apps to catch anything that I didn't notice.)

Nov 18 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Maurice | last post by:
Hi there, I'm experiencing big memory problems on my webserver. First on an old RedHat 7.2 system, now on an other fresh installed Suse 8.2 system: Linux version 2.4.20-4GB...
2
by: Jive | last post by:
The short form of the question is, how can I trace memory usage (preferably from C) with an eye toward finding out if I'm leaking memory? I would have thought there would be a ton of info on...
2
by: barkha shah | last post by:
Hi , Can any one please suggest me the memory Leak detecting tool in Visual Studio.Net 2003 Release version Framework. Can I use Numega Bounds checker for this. Thanks and Regards. barkha
0
by: Steve Binney | last post by:
My code makes synchronous HttpWebRequest and HttpRebResponse calls. In VS 2003, I am getting memory leaks and event handle leaks. I am closing all streams and using "using"statements. I have...
2
by: Generic Usenet Account | last post by:
I have been using STL for a long time now, without any problems. Recently we generated a purification report on our software using Rational Purify, and we found some memory leaks. My colleague...
2
by: JerryK | last post by:
Hi, We have a complex application that is experiencing a "memory leak". This is not a traditional memory, since the application gives all the memory back at terminate. Rather what we see i...
4
by: Diego Martins | last post by:
Hi all! I am doing a crude investigation of memory leaks in objects created by external libraries. Since I don't have access to the source code, I can't tell if an object are freeing its resources...
13
by: Ilias Lazaridis | last post by:
How to detect memory leaks of python programms, which run in an environment like this: * Suse Linux 9.3 * Apache * mod_python The problem occoured after some updates on the infrastructure....
16
by: graham.keellings | last post by:
hi, I'm looking for an open source memory pool. It's for use on an embedded system, if that makes any difference. Something with garbage collection/defragmentation would be nice. It should have...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.