472,958 Members | 1,804 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

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.OutOfMemoryException 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 6612
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**********************************@microsof t.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.OutOfMemoryException 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**********************************@microsof t.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.OutOfMemoryException 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.orgwrote in
message news:e0**************@TK2MSFTNGP06.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**********************************@microsof t.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.OutOfMemoryException 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**********@nothinks.comwrote in message
news:#Y**************@TK2MSFTNGP03.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**********************************@microsof t.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.OutOfMemoryException 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**********************************@microsof t.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**********@nothinks.comwrote in message
news:#Y**************@TK2MSFTNGP03.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**********************************@microso ft.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.OutOfMemoryException 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.public.dotnet.framework.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.spam.here-webworks-software.comwrote in
message news:et**************@TK2MSFTNGP04.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
To answer your questions:

1. Yes, we noticed the issues about 2 weeks after a release. The 3rd party
component was updated in that release, I don't think we're using any new
features, but I'll check.

2. I don't see anything in that KB article that describes the symptoms
we're seeing either. We're not getting any of the error messages that would
suggest a thread pool issue, I'm not quite sure how they ended up at that kb
article.

"Scott Roberts" <sr******@no.spam.here-webworks-software.comwrote in
message news:O1**************@TK2MSFTNGP06.phx.gbl...
>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 #11

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

Similar topics

1
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...
7
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...
4
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...
5
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. ...
7
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...
16
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. ...
2
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...
5
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...
3
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...
2
by: DJRhino | last post by:
Was curious if anyone else was having this same issue or not.... I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 4 Oct 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
tracyyun
by: tracyyun | last post by:
Hello everyone, I have a question and would like some advice on network connectivity. I have one computer connected to my router via WiFi, but I have two other computers that I want to be able to...
2
by: giovanniandrean | last post by:
The energy model is structured as follows and uses excel sheets to give input data: 1-Utility.py contains all the functions needed to calculate the variables and other minor things (mentions...
3
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be using a very simple database which has Form (clsForm) & Report (clsReport) classes that simply handle making the calling Form invisible until the Form, or all...
1
by: Teri B | last post by:
Hi, I have created a sub-form Roles. In my course form the user selects the roles assigned to the course. 0ne-to-many. One course many roles. Then I created a report based on the Course form and...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 1 Nov 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM) Please note that the UK and Europe revert to winter time on...
0
isladogs
by: isladogs | last post by:
The next online meeting of the Access Europe User Group will be on Wednesday 6 Dec 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, Mike...
2
by: GKJR | last post by:
Does anyone have a recommendation to build a standalone application to replace an Access database? I have my bookkeeping software I developed in Access that I would like to make available to other...

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.