aspnet_wp.exe memory usage keep growing

C

Clement

hi,
i have an asp.net site and is using SQL Server 2k. i realize the
aspnet_wp.exe memory usage keep growing and i will receive an error for the
pages that call the sql connection. others page with no sql connection is
fined.
At the time when i encounter the error, i check the memory usage for

aspnet_wp.exe = 60000kb
sqlmangr.exe = 40000kb

at this time, if i terminated the aspnet_wp.exe from the task manager, my
asp.net web site will back to normal and this problem will occurs again once
the memory usage is hit to above the same values i mention above.

in my asp.net, i have several classes that have its own sqlconnection object
and at the end of code i always dispose the sqlcommand and sqlconnection
object and it still doesn't help to resolve the problem.
from my log record, i can see this problem only arrise when performing the
sql query like sqlcommand.executereader or sqlcommand.executenonquery and
etc.

Follwing is the spec for the software and hardware running the sql and
asp.net
Software Spec
1. .NetFramework 1.0 with SP2
2. Win2k Server with SP3
3. SQL Server 2000 with sp2

Hardware spec.
1. P4 Xeon processor
2. 512MB Ram

Please help!!!
Thanks
from clement
 
K

Kevin Spencer

60000KB is 60MB, which is not a lot or memory. ASP.Net uses garbage
collection to clean up unused memory. The garbage collection assures that
all unused objects will be removed from memory, but the trade-off is that
the objects are not removed immediately. There is a period of time during
which unused objects sit in memory waiting for garbage collection. For this
reason, a typical ASP.Net app will increase memory usage for a time after
which it levels off, and can even drop. But at 60MB of memory, you are not
using a lot of memory by ASP.Net standards.

HTH,

Kevin Spencer
Microsoft FrontPage MVP
Internet Developer
http://www.takempis.com
Big things are made up of
lots of Little things.
 
K

Kairi Zikpin

check to see if you are running out of db connections.

are you exlicitly closing the connections to the database? before
disposing of the objct you need to call sql_connection.close
 
C

Clement

firstly, thanks for your immediate reply.
thats right.
i had try to configure the machine.config at <processModel>memoryLimit = 40,
it still can't help. my asp.net program will hit to "404 page not found" or
just give me blank page.

by the way, i had also downloaded the iis5recycle.exe and i configure to run
the recycle when the momory goes to 50MB and it still not resolved the
problem.

appreciate ur help!!!
 
C

Clement

i do conn.close, conn.dispose and conn = nothing after use. by running the
SQL Profiller, i can see the sql db been called and there is always 1 or 2
connection pool in used. and the same pool will reused if not timeout.
 
K

Kevin Spencer

In .Net it is a waste of time to set an object to Nothing, BTW. That is
handled by Garbage Collection.

HTH,

Kevin Spencer
Microsoft FrontPage MVP
Internet Developer
http://www.takempis.com
Big things are made up of
lots of Little things.
 
C

Clement

got any idea for work around ?
i got an crazy idea to restart the IIS every 10 hours. but it is not the
final soulution.
any suggestion
 
K

Kevin Spencer

As I mentioned in my previous reply, I don't think you have a problem. 60MB
is a small footprint for ASP.Net. If your machine can't handle the load, you
need more RAM. It's cheap!

HTH,

Kevin Spencer
Microsoft FrontPage MVP
Internet Developer
http://www.takempis.com
Some things just happen.
Everything else occurs.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,968
Messages
2,570,154
Members
46,702
Latest member
LukasConde

Latest Threads

Top