Classic ASP Classes

S

ShepardBerry

I've been working in .NET for some time now and I don't remember specifically
how asp classes are cleaned up in classic asp. I've been put on a Classic
ASP project(ugh) and we're having some serious stability problems. Once we
reach a point of sustained CPU useage of over 80% IIS 6 restarts the w3wp.exe
process which of course terminates all sessions and resets the website. I've
noticed that the previous developer has an include which creates a couple of
class objects in ASP. Not third party or "CreateObject" objects, but ASP
classes. This include is in A LOT of files and the classes not being
destroyed in any of them.

My question is could this be the problem? I seem to remember a problem with
ASP classes and not destroying them causing leaks of some sort. I need to
mention that the memory doesn't seem to be leaking but the CPU utilization
goes wacko as if ASP/IIS is corrupt. My environment is Windows 2k3 and IIS
6. The previous environment was Windows 2K and IIS5. Both environments had
the problem.

Before I go through these hundreds of files I was wondering if anyone
remember what the problem was with ASP classes not being destroyed.

Thanks for any help.
 
A

Aaron Bertrand [SQL Server MVP]

Before I go through these hundreds of files I was wondering if anyone
remember what the problem was with ASP classes not being destroyed.

Unknown, wildly speculated. Why leave this open to chance?

If there is an include footer, how hard would it be to add something like
the following code:

If IsObject(ClassName) Then
Set ClassName = Nothing
End If

?
 
B

Bob Barrows [MVP]

ShepardBerry said:
I've been working in .NET for some time now and I don't remember
specifically how asp classes are cleaned up in classic asp. I've
been put on a Classic ASP project(ugh) and we're having some serious
stability problems. Once we reach a point of sustained CPU useage of
over 80% IIS 6 restarts the w3wp.exe process which of course
terminates all sessions and resets the website. I've noticed that
the previous developer has an include which creates a couple of class
objects in ASP. Not third party or "CreateObject" objects, but ASP
classes. This include is in A LOT of files and the classes not being
destroyed in any of them.

My question is could this be the problem? I seem to remember a
problem with ASP classes and not destroying them causing leaks of
some sort.

No. These issues had to do with COM objects created using CreateObject,
specifically ADO COM objects.
See http://blogs.msdn.com/ericlippert/archive/2004/04/28/122259.aspx
I need to mention that the memory doesn't seem to be
leaking but the CPU utilization goes wacko as if ASP/IIS is corrupt.
My environment is Windows 2k3 and IIS
6. The previous environment was Windows 2K and IIS5. Both
environments had the problem.


I think you need to dl and use iisstate, and post its results to
..inetserver.iis. You can get iisstate from www.iisfaq.com

Bob Barrows
 
A

abcd

I will recommend to use

if isobject(obj) then
if not obj is nothing then
'do something
end if
end if
 

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

No members online now.

Forum statistics

Threads
473,994
Messages
2,570,223
Members
46,812
Latest member
GracielaWa

Latest Threads

Top