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.

Re: Classic ASP Classes by Aaron

Aaron
Wed Jul 13 12:10:10 CDT 2005

> 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

?



Re: Classic ASP Classes by Bob

Bob
Wed Jul 13 12:36:27 CDT 2005

ShepardBerry wrote:
> 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

--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.



Re: Classic ASP Classes by abcd

abcd
Thu Jul 14 11:46:09 CDT 2005

I will recommend to use

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



Aaron Bertrand [SQL Server MVP] wrote:
>> 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
>
> ?