473,385 Members | 1,942 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.

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 1390
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*****@springwireless.net> wrote in message
news:%2****************@tk2msftngp13.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.com> wrote in message
news:OC**************@TK2MSFTNGP10.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*****@springwireless.net> wrote in message
news:%2****************@tk2msftngp13.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
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. ...
8
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...
1
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...
17
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...
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: 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
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...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
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,...
0
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...

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.