473,854 Members | 1,695 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Troubleshooting ASP.Net memory usage issues?

I'm responsible for a pair of IIS 6 webservers that run our production
ASP.Net application. We push code on a monthly basis, and about two weeks
after our October code push, we started to run into occasional webserver
errors.

The application pool is configured to run as a domain user which has
permissions to the web code. When we have issues, the webserver will return
the ASP.Net "Server Application Unavailable" page, and our app pool memory
usage is really high (anywhere from 2 to 4 times our normal usage). Non
asp.net content is served up just fine. If I recycle the application pool
or do an iisreset, memory usage drops back to normal and the site starts
working again.

Nothing is logged to the eventlog or http error log, and the only errors we
see from our application has been the occasional "Exception of type
System.OutOfMem oryException was thrown." The same page doesn't error every
time, and the function I've seen throw exceptions is incredibly generic and
used heavily throughout our entire application (or so our devs have told
me). Our application doesn't even log an error every time this has
happened.

How should I go about troubleshooting this? Our devs are saying it's a
server issue, but I'm leaning towards a code issue. These servers are
running Windows 2003 Server standard, fully updated as of this last weekend.

Nov 14 '07 #1
10 6693
What session management are you using. InProc sessions are major memory
consumers.

--
Eliyahu Goldin,
Software Developer
Microsoft MVP [ASP.NET]
http://msmvps.com/blogs/egoldin
http://usableasp.net
"Daniel Peterson" <py****@hotmail .comwrote in message
news:CB******** *************** ***********@mic rosoft.com...
I'm responsible for a pair of IIS 6 webservers that run our production
ASP.Net application. We push code on a monthly basis, and about two weeks
after our October code push, we started to run into occasional webserver
errors.

The application pool is configured to run as a domain user which has
permissions to the web code. When we have issues, the webserver will
return the ASP.Net "Server Application Unavailable" page, and our app pool
memory usage is really high (anywhere from 2 to 4 times our normal usage).
Non asp.net content is served up just fine. If I recycle the application
pool or do an iisreset, memory usage drops back to normal and the site
starts working again.

Nothing is logged to the eventlog or http error log, and the only errors
we see from our application has been the occasional "Exception of type
System.OutOfMem oryException was thrown." The same page doesn't error
every time, and the function I've seen throw exceptions is incredibly
generic and used heavily throughout our entire application (or so our devs
have told me). Our application doesn't even log an error every time this
has happened.

How should I go about troubleshooting this? Our devs are saying it's a
server issue, but I'm leaning towards a code issue. These servers are
running Windows 2003 Server standard, fully updated as of this last
weekend.

Nov 15 '07 #2
Hi Daniel,

It's a code issue. It will be one of 2 possible reasons: 1. Memory Leak.
Yes, .Net applications can leak memory, if they use unmanaged resources that
are not disposed properly. 2. Memory Fragmentation. If the same block of
memory is re-used as, for example, an application-level collection that has
members added and removed over a long period of time, that memory can become
fragmented, necessitating the allocation of more memory to create contiguous
blocks when they are needed.

--
HTH,

Kevin Spencer
Chicken Salad Surgeon
Microsoft MVP

"Daniel Peterson" <py****@hotmail .comwrote in message
news:CB******** *************** ***********@mic rosoft.com...
I'm responsible for a pair of IIS 6 webservers that run our production
ASP.Net application. We push code on a monthly basis, and about two weeks
after our October code push, we started to run into occasional webserver
errors.

The application pool is configured to run as a domain user which has
permissions to the web code. When we have issues, the webserver will
return the ASP.Net "Server Application Unavailable" page, and our app pool
memory usage is really high (anywhere from 2 to 4 times our normal usage).
Non asp.net content is served up just fine. If I recycle the application
pool or do an iisreset, memory usage drops back to normal and the site
starts working again.

Nothing is logged to the eventlog or http error log, and the only errors
we see from our application has been the occasional "Exception of type
System.OutOfMem oryException was thrown." The same page doesn't error
every time, and the function I've seen throw exceptions is incredibly
generic and used heavily throughout our entire application (or so our devs
have told me). Our application doesn't even log an error every time this
has happened.

How should I go about troubleshooting this? Our devs are saying it's a
server issue, but I'm leaning towards a code issue. These servers are
running Windows 2003 Server standard, fully updated as of this last
weekend.

Nov 15 '07 #3
We're using the session state db.

"Eliyahu Goldin" <RE************ **************@ mMvVpPsS.orgwro te in
message news:e0******** ******@TK2MSFTN GP06.phx.gbl...
What session management are you using. InProc sessions are major memory
consumers.

--
Eliyahu Goldin,
Software Developer
Microsoft MVP [ASP.NET]
http://msmvps.com/blogs/egoldin
http://usableasp.net
"Daniel Peterson" <py****@hotmail .comwrote in message
news:CB******** *************** ***********@mic rosoft.com...
>I'm responsible for a pair of IIS 6 webservers that run our production
ASP.Net application. We push code on a monthly basis, and about two
weeks after our October code push, we started to run into occasional
webserver errors.

The application pool is configured to run as a domain user which has
permissions to the web code. When we have issues, the webserver will
return the ASP.Net "Server Application Unavailable" page, and our app
pool memory usage is really high (anywhere from 2 to 4 times our normal
usage). Non asp.net content is served up just fine. If I recycle the
application pool or do an iisreset, memory usage drops back to normal and
the site starts working again.

Nothing is logged to the eventlog or http error log, and the only errors
we see from our application has been the occasional "Exception of type
System.OutOfMe moryException was thrown." The same page doesn't error
every time, and the function I've seen throw exceptions is incredibly
generic and used heavily throughout our entire application (or so our
devs have told me). Our application doesn't even log an error every time
this has happened.

How should I go about troubleshooting this? Our devs are saying it's a
server issue, but I'm leaning towards a code issue. These servers are
running Windows 2003 Server standard, fully updated as of this last
weekend.

Nov 15 '07 #4
So what's the best route to troubleshoot, just bust out debugdiag and go
from there?

If it's option #2 as you mention below, would cycling the application pool
more frequently solve that? I think we're using the 1740 minute default
right now.

"Kevin Spencer" <un**********@n othinks.comwrot e in message
news:#Y******** ******@TK2MSFTN GP03.phx.gbl...
Hi Daniel,

It's a code issue. It will be one of 2 possible reasons: 1. Memory Leak.
Yes, .Net applications can leak memory, if they use unmanaged resources
that are not disposed properly. 2. Memory Fragmentation. If the same block
of memory is re-used as, for example, an application-level collection that
has members added and removed over a long period of time, that memory can
become fragmented, necessitating the allocation of more memory to create
contiguous blocks when they are needed.

--
HTH,

Kevin Spencer
Chicken Salad Surgeon
Microsoft MVP

"Daniel Peterson" <py****@hotmail .comwrote in message
news:CB******** *************** ***********@mic rosoft.com...
>I'm responsible for a pair of IIS 6 webservers that run our production
ASP.Net application. We push code on a monthly basis, and about two
weeks after our October code push, we started to run into occasional
webserver errors.

The application pool is configured to run as a domain user which has
permissions to the web code. When we have issues, the webserver will
return the ASP.Net "Server Application Unavailable" page, and our app
pool memory usage is really high (anywhere from 2 to 4 times our normal
usage). Non asp.net content is served up just fine. If I recycle the
application pool or do an iisreset, memory usage drops back to normal and
the site starts working again.

Nothing is logged to the eventlog or http error log, and the only errors
we see from our application has been the occasional "Exception of type
System.OutOfMe moryException was thrown." The same page doesn't error
every time, and the function I've seen throw exceptions is incredibly
generic and used heavily throughout our entire application (or so our
devs have told me). Our application doesn't even log an error every time
this has happened.

How should I go about troubleshooting this? Our devs are saying it's a
server issue, but I'm leaning towards a code issue. These servers are
running Windows 2003 Server standard, fully updated as of this last
weekend.

Nov 15 '07 #5
Hi Daniel,

You could set up some performance counters, but the first thing I think I
would do is look for evidence of the 2 conditions I specified in the code.
It might very well show up rather easily if you know what you're looking
for.

--
HTH,

Kevin Spencer
Chicken Salad Surgeon
Microsoft MVP

"Daniel Peterson" <py****@hotmail .comwrote in message
news:03******** *************** ***********@mic rosoft.com...
So what's the best route to troubleshoot, just bust out debugdiag and go
from there?

If it's option #2 as you mention below, would cycling the application pool
more frequently solve that? I think we're using the 1740 minute default
right now.

"Kevin Spencer" <un**********@n othinks.comwrot e in message
news:#Y******** ******@TK2MSFTN GP03.phx.gbl...
>Hi Daniel,

It's a code issue. It will be one of 2 possible reasons: 1. Memory Leak.
Yes, .Net applications can leak memory, if they use unmanaged resources
that are not disposed properly. 2. Memory Fragmentation. If the same
block of memory is re-used as, for example, an application-level
collection that has members added and removed over a long period of time,
that memory can become fragmented, necessitating the allocation of more
memory to create contiguous blocks when they are needed.

--
HTH,

Kevin Spencer
Chicken Salad Surgeon
Microsoft MVP

"Daniel Peterson" <py****@hotmail .comwrote in message
news:CB******* *************** ************@mi crosoft.com...
>>I'm responsible for a pair of IIS 6 webservers that run our production
ASP.Net application. We push code on a monthly basis, and about two
weeks after our October code push, we started to run into occasional
webserver errors.

The application pool is configured to run as a domain user which has
permissions to the web code. When we have issues, the webserver will
return the ASP.Net "Server Application Unavailable" page, and our app
pool memory usage is really high (anywhere from 2 to 4 times our normal
usage). Non asp.net content is served up just fine. If I recycle the
application pool or do an iisreset, memory usage drops back to normal
and the site starts working again.

Nothing is logged to the eventlog or http error log, and the only errors
we see from our application has been the occasional "Exception of type
System.OutOfM emoryException was thrown." The same page doesn't error
every time, and the function I've seen throw exceptions is incredibly
generic and used heavily throughout our entire application (or so our
devs have told me). Our application doesn't even log an error every
time this has happened.

How should I go about troubleshooting this? Our devs are saying it's a
server issue, but I'm leaning towards a code issue. These servers are
running Windows 2003 Server standard, fully updated as of this last
weekend.


Nov 16 '07 #6
I agree with Kevin, it's a code issue. Too many coders think they don't have
to worry about memory management anymore since "DotNet does it for me!".

Personally, I would start by looking at the Session and/or Application
object. It's likely that some coder decided it would be convenient to stuff
a huge collection of search results (or some such thing) into the session
object and now it's being held there until the session expires.
You could set up some performance counters, but the first thing I think I
would do is look for evidence of the 2 conditions I specified in the code.
It might very well show up rather easily if you know what you're looking
for.
Nov 16 '07 #7
Another culprit could be IDisposable objects not being disposed. You
doing anything with the graphics object maybe?

Dave Bush
http://blog.dmbcllc.com

-----Original Message-----
From: Scott Roberts [mailto:sr****** @no.spam.here-webworks-software.com]

Posted At: Friday, November 16, 2007 9:34 AM
Posted To: microsoft.publi c.dotnet.framew ork.aspnet
Conversation: Troubleshooting ASP.Net memory usage issues?
Subject: Re: Troubleshooting ASP.Net memory usage issues?

I agree with Kevin, it's a code issue. Too many coders think they don't
have
to worry about memory management anymore since "DotNet does it for me!".

Personally, I would start by looking at the Session and/or Application
object. It's likely that some coder decided it would be convenient to
stuff
a huge collection of search results (or some such thing) into the
session
object and now it's being held there until the session expires.
You could set up some performance counters, but the first thing I
think I
would do is look for evidence of the 2 conditions I specified in the
code.
It might very well show up rather easily if you know what you're
looking
for.
Nov 16 '07 #8
Thanks for your help everyone. We found a 3rd party component with
debugdiag that appears to be leaking memory, although our devs seemed to
dismiss that as the issue, and they're still pointing to the servers. If
they don't want to look, I'm not sure how much more I can do.

They think that
http://support.microsoft.com/default...68&Product=asp
this is what's going on, although we're not seeing any of those errors or
eventlog messages.

Ugh.

"Scott Roberts" <sr******@no.sp am.here-webworks-software.comwro te in
message news:et******** ******@TK2MSFTN GP04.phx.gbl...
I agree with Kevin, it's a code issue. Too many coders think they don't
have to worry about memory management anymore since "DotNet does it for
me!".

Personally, I would start by looking at the Session and/or Application
object. It's likely that some coder decided it would be convenient to
stuff a huge collection of search results (or some such thing) into the
session object and now it's being held there until the session expires.
>You could set up some performance counters, but the first thing I think I
would do is look for evidence of the 2 conditions I specified in the
code. It might very well show up rather easily if you know what you're
looking for.
Nov 20 '07 #9
Thanks for your help everyone. We found a 3rd party component with
debugdiag that appears to be leaking memory, although our devs seemed to
dismiss that as the issue, and they're still pointing to the servers. If
they don't want to look, I'm not sure how much more I can do.
In your original post you mentioned that the problem started after a new
version was published, right? Was this 3rd party component used in the old
version of the site? Was it upgraded for the new version? Does the new
version use some features of this component that were previously unused?
They think that
http://support.microsoft.com/default...68&Product=asp
this is what's going on, although we're not seeing any of those errors or
eventlog messages.
I don't see anything pertaining to large memory usage in that KB. Is it a
memory problem or a thread pool problem?

Nov 20 '07 #10

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

Similar topics

1
4356
by: Jeff Roughgarden | last post by:
We are hosting a 140 GB database on SQL Server Version 7 and Windows 2000 Advanced Server on an 8-cpu box connected to a 15K rpm RAID 5 SAN, with 4 GB of RAM (only 2 GB of which seem to be visible to the OS) and a 4 GB swap file. (The PeopleSoft CIS application will not permit us to upgrade to SQL 2K.) We recently upgraded the server from 4 to 8 cpus and the SAN disks from 10K to 15K drives. But we still have heavy SAN disk usage,...
7
5196
by: George Gre | last post by:
Hi, I wrote a c# programme that listens to incoming TCP requests and services them. This programme is meant to be running as long as the server its installed on is running. So we assume for ever(!). My problem is that I have it running for 2 days now on my pc (win2Ksp3 P4 2GHz,512MB Ram - framework v1.0.3705) and the taskmanager reports that this process takes 97MB ram/130 VMemory and it looks that its eating up more ram(!!). To help...
4
2668
by: Douglas | last post by:
Hi, Any suggestions for estimating the amount of memory a program will use in advance, before it is run. Rules of thumb etc.? Is it then possible to warn a user that a program is likely to crash at start up? Swap space issues etc....... Douglas
5
3156
by: SDS | last post by:
I am writing an ASP.NET application (in C#) that, as part of a particular response, populates a MemoryStream object with binary data that is being collected from a Process object's StandardOutput. This data can be between 60MB and 100MB under normal circumstances. I write this data to the response stream. I'm noticing that calls to this particular page are causing W3WP to use upwards of 60MB. When W3WP starts up, its using around 24MB...
7
2440
by: Rich Denis | last post by:
Hello, I have been trying to solve a mysterious memory leak problem and was hoping that you could help me out on my stuck point. First a bit of background. We have two app servers in an app center cluster that are each running a number of web applications. For some reason one of the boxes' asp_wp process keeps recylcing on us. It seems that the memory just grows and grows and then recycles on us. I cam across and have read the...
16
2397
by: JCauble | last post by:
We have a large Asp.net application that is currently crashing our production servers. What we are seeing is the aspnet_wp eat up a bunch of memory and then stop unexpectedly. Does not recycle. Example: After about 5 hours with a concurrent user base of about 150 users the application raises the aspnet_wp memory usage by almost 500MB. If our server guys modify the web.config this data is released and the workerprocess goes back to a...
2
2929
by: Jenniflower | last post by:
Hi Gurus, Our system is using SqlServer 2005 on XP.( On my machine,only this application access SQLServer.) The sqlserver memory is configured to 128MB (Min)~512 MB(Max) After our system get started, sqlserver takes about 100M memory. After the system runs for a while, the memory used by sqlserver goes up to 512MB. Then we exit our application and expect the memory usage of SqlServer could be dropped down to the min value....
5
1106
by: Frank Rizzo | last post by:
Hello, I have a very frustrating issue I've been working on. I have a routine that does the following: 1. Load a large (declared local to the function) DataSet from the database. It contains 5 tables. 2. Load the database into a fairly complicated object model. 3. I dispose of the Dataset. Before loading the DataSet the MemUsage column in Task Manager shows 44 MB. After loading the database the MemUsage stands at 59 MB. Thus I
3
1615
by: davemerkel | last post by:
Hi folks - wondering if anyone has any pointers on troubleshooting garbage collection. My colleagues and I are running into an interesting problem: Intermittently, we get into a situation where the garbage collection code is running in an infinite loop. The data structures within the garbage collector have been corrupted, but it is unclear how or why. The problem is extremely difficult to reproduce consistently as it is unpredictable.
0
9750
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10672
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...
1
10744
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10364
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
9510
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
7077
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5738
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
5937
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
3182
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.