473,406 Members | 2,356 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,406 software developers and data experts.

Our memory leaks?

Friends,

I've been watching or W3WP process size (using Task Manager), and it grows
and grows when using our application. I am the only one on our server. I'll
end my session, either through timeout or logout, and the process size never
goes down. I could understand that if the next time I logged in the size
didn't change, implying that the process was big but had "headroom". But,
things start growing again.

I guess that we have leaks! I didn't think it was easy for a ASP.NET/C#
implmentation to leak? I've seen bad programming where a reference is held
so an object lives longer than one might expect, but once an object is
destroyed, (such as when the Session goes away), it should be freed.

Should I conclude that my app is leaking in an extreme way? How might I
ever find these things, the code looks good to us?

A friendly word or two will be very much appreciated. Thanks in advance!

James
Nov 19 '05 #1
2 1209
I believe that what you are seeing is normal. The memory requested by
ASP.NET stays allocated to it. When garbage collection runs, the memory is
marked as available but ASP.NET doesn't return the memory to the operating
system, it keeps it so that it can be allocated to later tasks.

"James Hunter Ross" <ja********@oneilsoft.com> wrote in message
news:ef**************@TK2MSFTNGP09.phx.gbl...
Friends,

I've been watching or W3WP process size (using Task Manager), and it grows
and grows when using our application. I am the only one on our server.
I'll end my session, either through timeout or logout, and the process
size never goes down. I could understand that if the next time I logged
in the size didn't change, implying that the process was big but had
"headroom". But, things start growing again.

I guess that we have leaks! I didn't think it was easy for a ASP.NET/C#
implmentation to leak? I've seen bad programming where a reference is
held so an object lives longer than one might expect, but once an object
is destroyed, (such as when the Session goes away), it should be freed.

Should I conclude that my app is leaking in an extreme way? How might I
ever find these things, the code looks good to us?

A friendly word or two will be very much appreciated. Thanks in advance!

James

Nov 19 '05 #2
actually they are pretty easy to get.

you need to determine if you are leaking managed or unmanaged memory.
failing to call dispose on component objects or not calling
Marshal.ReleaseComObject() on com objects is a sure way to "leak" unmanaged
memory. managed memory "leaks" happen when too much data is stored in inproc
sessions (takes 20 minutes to be released), statics holding references.

here is an article to get you started:

http://msdn.microsoft.com/library/de...ml/dbgch02.asp

-- bruce (sqlwork.com)
"James Hunter Ross" <ja********@oneilsoft.com> wrote in message
news:ef**************@TK2MSFTNGP09.phx.gbl...
Friends,

I've been watching or W3WP process size (using Task Manager), and it grows
and grows when using our application. I am the only one on our server.
I'll end my session, either through timeout or logout, and the process
size never goes down. I could understand that if the next time I logged
in the size didn't change, implying that the process was big but had
"headroom". But, things start growing again.

I guess that we have leaks! I didn't think it was easy for a ASP.NET/C#
implmentation to leak? I've seen bad programming where a reference is
held so an object lives longer than one might expect, but once an object
is destroyed, (such as when the Session goes away), it should be freed.

Should I conclude that my app is leaking in an extreme way? How might I
ever find these things, the code looks good to us?

A friendly word or two will be very much appreciated. Thanks in advance!

James


Nov 19 '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...
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...
4
by: Morten Aune Lyrstad | last post by:
Ok, now I'm officially confused. I have a large project going, which uses a win32 ui library I am developing myself. And I'm getting weird memory leaks. I don't know if I can explain what is going...
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...
8
by: ranjeet.gupta | last post by:
Dear All Is the Root Cause of the Memory corruption is the Memory leak, ?? suppose If in the code there is Memory leak, Do this may lead to the Memory Corruption while executing the program ? ...
0
by: Frank Lopez | last post by:
Does anyone know if Microsoft generated a whitepaper on this topic? Does anyone know what the solution is? (meaning, eliminate the leak problem -- I am seeing three memory leaks from...
4
by: ali.jan | last post by:
Hi, It is trivial to load an assembly in a new Application Domain. Is there any way of loading an assembly in a new process? I tried using the Process class like this: Process p = new...
23
by: James | last post by:
The following code will create memory leaks!!! using System; using System.Diagnostics; using System.Data; using System.Data.SqlClient; namespace MemoryLeak
3
by: Jim Land | last post by:
Jack Slocum claims here http://www.jackslocum.com/yui/2006/10/02/3-easy-steps-to-avoid-javascript- memory-leaks/ that "almost every site you visit that uses JavaScript is leaking memory". ...
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: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
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
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:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
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...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.