Groups | Blog | Home
all groups > c# > may 2006 >

c# : Aplication slows down


mamin
5/8/2006 11:43:05 PM
My application works under IIS 5.1 and is connected with oracle 9.2
database. After a few days of working it starts to work slower aned
slower. I've checked connections with database if they are closed but
in Enterprise Menager Console - Instance - Sessions all connections
are closed. I've noticed that process aspnet_wp.exe uses more and more
memory, maybe this is the reason? Killing this process results in
getting my application work faster. What should I do to prevent my
application from getting slower. (I want to avoid restarting
aspnet_wp.exe process).What can I check except for connections and
aspnet_wp.exe process. Maybe it's another way to check closed
connections...?
mamin
5/9/2006 2:47:00 AM
Every time, befor opening new connection , the following code is
excuted:
GC.Collect;
GC.WaitingForPendingFinalizers()
Mark Rae
5/9/2006 8:55:04 AM
[quoted text, click to view]

That any and all objects are being disposed as soon as they're no longer
needed - you can't rely on the GC to do this for you...

Ignacio Machin ( .NET/ C# MVP )
5/9/2006 9:52:46 AM
Hi,

[quoted text, click to view]

You do not need to call Collect, it will be called regulary , your problem
may be that you are keeping objects in either session or appliction context
that are not getting released.

Check all your Session["Variable"] or Application["Variable"] you have,
check also any collection or property marked as static



--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation

mamin
5/9/2006 11:47:04 PM
Ok, but what should I do with such static properties and static
variables? I thought that after calling GC.Collect() and
GC.WaitingForPendingFinalizers() all useless objects (also this
static) will be released?
mamin
5/10/2006 2:18:07 AM
I noticed that in fact aspnet_wp.exe process don't realy uses this
memory(even 140 000 K), and only task manager shows that. After
starting another process, for example visual studio, aspnet_wp.exe
starts to release the memory. But even if aspnet_wp.exe uses 3 000 K of
memory, my application doesn't running as fast as after killing
aspnet_w.exe process.
So, where's the problem? Maybe it's not about the memory leaks?
mamin
5/11/2006 12:11:18 AM
I noticed, that applications starts to slow down, after running it from
another computer.I mean that from computer A i can run application and
it works fine, then I'm running application from computer B and after
that on both computers, application runs very slowly. And even after
restarting Oracle database, it still runs slowly. The only way to make
it faster is killing aspnet_wp.exe.
AddThis Social Bookmark Button