Classic ASP Classes

Discussion in 'ASP General' started by ShepardBerry, Jul 13, 2005.

  1. ShepardBerry

    ShepardBerry Guest

    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.
     
    ShepardBerry, Jul 13, 2005
    #1
    1. Advertising

  2. > 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

    ?
     
    Aaron Bertrand [SQL Server MVP], Jul 13, 2005
    #2
    1. Advertising

  3. 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.
     
    Bob Barrows [MVP], Jul 13, 2005
    #3
  4. ShepardBerry

    abcd Guest

    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
    >
    > ?
     
    abcd, Jul 14, 2005
    #4
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Chris S.

    Classic and New Style Classes?

    Chris S., Jun 24, 2004, in forum: Python
    Replies:
    5
    Views:
    359
    Chris S.
    Jun 24, 2004
  2. Simon Wittber
    Replies:
    16
    Views:
    583
    Steve Holden
    Jan 14, 2005
  3. venk
    Replies:
    5
    Views:
    323
  4. ankit
    Replies:
    1
    Views:
    343
    Alex Martelli
    Dec 22, 2005
  5. Quek
    Replies:
    3
    Views:
    339
Loading...

Share This Page