473,834 Members | 1,761 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

High memory in a ASP.NET application - how to monitor, what can cause?

Hi:
We have an ASP.NET application that has a memory consumption issue -
it's go up to 150 MB in a few time (some hours).
The application uses two Microsoft Application Blocks, the User
Interface and the Data Access. The User Interface block was highly modified
to support our needs. One of the changes is a process that "cleanup" unused
tasks, when a fresh new one is open. This works fine, but to deallocate the
old task I only remove it from a HashTable. Should I call Dispose()
explicitily?
Is there any known memory leak in ASP.NET? Is the UIPAB familiar to you,
I am wondering if someone has (or had) the same problem that I'm having
now...
And the other point is:
I also would like to monitor all active sessions that belong to my
application. Is this possible? And more, for each session, enumerate the
variables (this is easy), and have an idea of how many bytes are being
consumed in each entry (this is not so easy, I think)...

Any sugestions?
Thanks,
Ravi.
Jan 13 '06 #1
2 1412
if you add objects to a hashtable that use unmanged resources (common reason
to implement IDispose), and the hashtable is the only reference, then you
need to call Dispose to free these unmanged resources, when you remove the
object from the hashtable (or clear the hashtable). the GC will call Dispose
eventually, but it may be a long time.

the usual trick to get the approximate size of an object is to serialize it
to a byte array, and check the array size. of course this requires the
object be serializable, and tell nothing about unmanged memory in use.

if you use the sos.dll with win32 debugger you get info about mamnegd and
unmanged memory.
-- bruce (sqlwork.com)


"Ravi Ambros Wallau" <rw*****@spring wireless.net> wrote in message
news:%2******** ********@tk2msf tngp13.phx.gbl. ..
Hi:
We have an ASP.NET application that has a memory consumption issue -
it's go up to 150 MB in a few time (some hours).
The application uses two Microsoft Application Blocks, the User
Interface and the Data Access. The User Interface block was highly
modified to support our needs. One of the changes is a process that
"cleanup" unused tasks, when a fresh new one is open. This works fine, but
to deallocate the old task I only remove it from a HashTable. Should I
call Dispose() explicitily?
Is there any known memory leak in ASP.NET? Is the UIPAB familiar to
you, I am wondering if someone has (or had) the same problem that I'm
having now...
And the other point is:
I also would like to monitor all active sessions that belong to my
application. Is this possible? And more, for each session, enumerate the
variables (this is easy), and have an idea of how many bytes are being
consumed in each entry (this is not so easy, I think)...

Any sugestions?
Thanks,
Ravi.

Jan 13 '06 #2
Bruce:
All objects that belongs to all hashtables are managed (are standart
framework objects).
And the hashtable is the only reference to another class that as a lot
of things, including some hashtables. I think that when it's become
inacessible (by removing the only reference that exists, in the session
hashtable), it should be disposed.
I am thinking on this alternative (call Dispose manually), but I'm a
little afraid about the performance issues related with this operation.
All my memory is managed.
I would not like to serialize everything :-(. Too much process envolved
on doing this. The .Net framework doesnt know how many bytes a object is
using?
"Bruce Barker" <br************ ******@safeco.c om> wrote in message
news:OC******** ******@TK2MSFTN GP10.phx.gbl...
if you add objects to a hashtable that use unmanged resources (common
reason to implement IDispose), and the hashtable is the only reference,
then you need to call Dispose to free these unmanged resources, when you
remove the object from the hashtable (or clear the hashtable). the GC will
call Dispose eventually, but it may be a long time.

the usual trick to get the approximate size of an object is to serialize
it to a byte array, and check the array size. of course this requires the
object be serializable, and tell nothing about unmanged memory in use.

if you use the sos.dll with win32 debugger you get info about mamnegd and
unmanged memory.
-- bruce (sqlwork.com)


"Ravi Ambros Wallau" <rw*****@spring wireless.net> wrote in message
news:%2******** ********@tk2msf tngp13.phx.gbl. ..
Hi:
We have an ASP.NET application that has a memory consumption issue -
it's go up to 150 MB in a few time (some hours).
The application uses two Microsoft Application Blocks, the User
Interface and the Data Access. The User Interface block was highly
modified to support our needs. One of the changes is a process that
"cleanup" unused tasks, when a fresh new one is open. This works fine,
but to deallocate the old task I only remove it from a HashTable. Should
I call Dispose() explicitily?
Is there any known memory leak in ASP.NET? Is the UIPAB familiar to
you, I am wondering if someone has (or had) the same problem that I'm
having now...
And the other point is:
I also would like to monitor all active sessions that belong to my
application. Is this possible? And more, for each session, enumerate the
variables (this is easy), and have an idea of how many bytes are being
consumed in each entry (this is not so easy, I think)...

Any sugestions?
Thanks,
Ravi.



Jan 13 '06 #3

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

Similar topics

5
1573
by: Ron Mexico | last post by:
I have written a graphing engine (very similar to what BigCharts.com offers). Basically, it's an ASPX page that accepts parameters and calls back-end business objects (dlls) to create a graph. When the graph is created as a jpeg, it is returned to the browser as binary data. When it is used at a low volume, it performs great and returns correctly drawn graphs in a timely manner. However when the amount of traffic is increased to a high...
8
8560
by: Adrian | last post by:
Hi I have a JS program that runs localy (under IE6 only) on a PC but it has a memory leak (probably the known MS one!) What applications are there that I could use to look at the memory usage of each object within my JS app to help locate my problem? Thanks
1
4859
by: Damien | last post by:
Hi guys, I'm looking for ideas for troubleshooting the following. We've tried some random things to try to treat the symptoms, but none seem robust enough to use when we go live, and we'd rather discover the root cause: We've got an ASP.NET application, running on framework 1.1 on Windows 2003 (IIS 6). Under default settings, during testing by two users, we're seeing the CPU usage on w3wp.exe rocket up and stay up (and thus cause web...
17
7974
by: Cesar | last post by:
Hello people. I'm having a Winform app that contains a webbrowser control that keeps navigating from one page to another permanentrly to make some tests. The problem I'm having is that after a while, the application is using more than 100 or 150 Mb in RAM, and if I let it continue, it can leave the system without memory. I've been watching in some pages that other people has the same problem with this control when keep navigating for a...
0
9797
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10793
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10509
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10219
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9331
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5626
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5793
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4427
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3977
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.