ASP and Multiple Processes

  • I have an ASP (vbScript) Page hitting a SQL Server database.  The asp page probably has about 5 concurrent users and I am getting 23 open processes in the database.  I'm assuming some code is leaving a process open or there is a setting change needed to close processes automatically.  Can anyone point me to references discussing process open and close issues with ASP?  Any clues on what code mistakes cause the process to stay open?

     

  • Make sure you close all result sets and your connection and that you destroy the object after closing it:

    rsLookup.close
    set rsLookup = nothing
    rsMain.close
    set rsMain = nothing
    conn.close
    set conn = nothing

    These are the most important things to do regarding closing. Also, don't wait until the end of the ASP page to close and destroy a resultset. Close and destroy it as soon as you're done with it.

    You don't state whether or not there are multiple resultsets in the ASP page, nor whether you are accessing the database for read or update. Make sure any read-only, lookup type resultsets are declared with a fast-forward cursor. This won't reduce processes, but will help with locking.

     

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply