ADVICE WANTED: Website Performance Issues

Discussion in 'ASP General' started by KWilliams, Dec 13, 2005.

  1. KWilliams

    KWilliams Guest

    I'd like to get some good advice about our old ASP site. You can see our home
    page at:
    http://www.douglas-county.com/

    ....and an example application page at:
    http://www.douglas-county.com/employment/currentopenings2.asp

    Our old site uses classic ASP with JavaScript syntax. I'm in the process of
    developing a new site that uses XML/XSLT/CSS/ASP.NET/VB.NET, but in the
    meantime, we still have our old site up. It contains a lot of applications
    that use SQL Server 2000 data, and we're having some major performance issues.

    I already know that one issue is the use of tables for formatting, and I'm
    already correcting that problem by using CSS Positioning with my new site.
    Besides that, here are some of the issues that we're having:

    Different Browser Issues?
    The site loads much quicker for me in Mozilla Firefox than it does in IE 6.0
    for some reason. If this difference is an obvious sign of something, I'd love
    to know what that could be.

    Connection Issues?
    I've looked into whether this problem could be due to "leaky connections",
    but this is how I have my connections set up:
    Code:
    <%@language="javascript"%>
    <%
    var MM_strConn_STRING =
    "Provider=SQLOLEDB;Server=SERVERNAME;Database=DBNAME;UID=UID;PWD=PWD"
    %>
    <%
    var Recordset1 = Server.CreateObject("ADODB.Recordset");
    Recordset1.ActiveConnection = MM_strConn_STRING;
    Recordset1.Source = "SELECT *  FROM dbo.tblTABLENAME";
    Recordset1.CursorType = 0;
    Recordset1.CursorLocation = 2;
    Recordset1.LockType = 3;
    Recordset1.Open();
    var Recordset1_numRows = 0;
    %>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <body>...</body>
    </html>
    <%
    Recordset1.Close();
    %>
    The reason I'm looking at this as a possible cause is because my Network
    Administrator states that when he restarts the SQL Server, the site loads
    quicker. Then over time, it seems to get bogged down until the server is
    restarted again. It loads much slower for some users than others for some
    reason, and that's when they have the same browser version.

    Ok, that's it. If there are any other obvious causes of this issue, please
    let me know. Any constructive criticism would be greatly appreciated. Thanks.
    KWilliams, Dec 13, 2005
    #1
    1. Advertising

  2. KWilliams

    Jevon Guest

    There are a few things to consider here.

    The browser issue you mention is (possibly) related to how different
    browsers load pages - some wait for the entire <table> element to arrive
    (i.e. until </table>) before rendering the table for display, others do it
    as it comes. Some (I think) delay rendering until [some] images are loaded,
    etc. I don't know if these options can be configured or not so might not be
    the only issue. Caching [of images] might be having an effect too.

    I don't have experience of using recordsets the way you do, without an
    ADODB.Connection object, however you should open Recordsets/database
    connections for the minimal amount of time possible. Also, I don't know if
    you explicitly need to close the database connection with your method or
    not.

    Is your site the only thing using the SQL Server? If not, do other
    sites/systems run noticeably faster after a restart? I wonder if perhaps
    there is a mis-configuration with the SQL Server causing the slowdown; is it
    fully patched? What is the memory usage like with both SQL and IIS before
    and after a restart?

    Jevon


    "KWilliams" <> wrote in message
    news:D...
    > I'd like to get some good advice about our old ASP site. You can see our
    > home
    > page at:
    > http://www.douglas-county.com/
    >
    > ...and an example application page at:
    > http://www.douglas-county.com/employment/currentopenings2.asp
    >
    > Our old site uses classic ASP with JavaScript syntax. I'm in the process
    > of
    > developing a new site that uses XML/XSLT/CSS/ASP.NET/VB.NET, but in the
    > meantime, we still have our old site up. It contains a lot of applications
    > that use SQL Server 2000 data, and we're having some major performance
    > issues.
    >
    > I already know that one issue is the use of tables for formatting, and I'm
    > already correcting that problem by using CSS Positioning with my new site.
    > Besides that, here are some of the issues that we're having:
    >
    > Different Browser Issues?
    > The site loads much quicker for me in Mozilla Firefox than it does in IE
    > 6.0
    > for some reason. If this difference is an obvious sign of something, I'd
    > love
    > to know what that could be.
    >
    > Connection Issues?
    > I've looked into whether this problem could be due to "leaky connections",
    > but this is how I have my connections set up:
    >
    Code:
    <%@language="javascript"%>
    > <%
    > var MM_strConn_STRING =
    > "Provider=SQLOLEDB;Server=SERVERNAME;Database=DBNAME;UID=UID;PWD=PWD"
    > %>
    > <%
    > var Recordset1 = Server.CreateObject("ADODB.Recordset");
    > Recordset1.ActiveConnection = MM_strConn_STRING;
    > Recordset1.Source = "SELECT *  FROM dbo.tblTABLENAME";
    > Recordset1.CursorType = 0;
    > Recordset1.CursorLocation = 2;
    > Recordset1.LockType = 3;
    > Recordset1.Open();
    > var Recordset1_numRows = 0;
    > %>
    > <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    > "http://www.w3.org/TR/html4/loose.dtd">
    > <html>
    > <body>...</body>
    > </html>
    > <%
    > Recordset1.Close();
    > %>
    >
    > The reason I'm looking at this as a possible cause is because my Network
    > Administrator states that when he restarts the SQL Server, the site loads
    > quicker. Then over time, it seems to get bogged down until the server is
    > restarted again. It loads much slower for some users than others for some
    > reason, and that's when they have the same browser version.
    >
    > Ok, that's it. If there are any other obvious causes of this issue, please
    > let me know. Any constructive criticism would be greatly appreciated.
    > Thanks.
    Jevon, Dec 13, 2005
    #2
    1. Advertising

  3. KWilliams

    preet Guest

    I have used MS SQL 2000 and worked as a database administraor for a
    large corporate handling close to 67 million records which is used by
    call center executives around 1700 in number with multiple queries per
    second.

    My advice would be, first never use session variables bake cookies
    instead (i love to eat them)

    second improve on your sql query, as far as possible you should do the
    maximum processing on the SQL server and use the results for the web
    page.

    Your maximum average query traffic per query should not exceed 1 KB
    unless you are running large reports.

    MOST IMPORTANT - as far as possible keep the main sql database on
    private IP ; if you require it on public IP then specify only one port
    open and rest all closed.

    And please please patch your system thoroughly.



    A comprehensive knowledgebase on EECP treatment and procedures
    worldwide.
    http://www.eecpworld.com
    Provide your suggestions for improvement

    *** Sent via Developersdex http://www.developersdex.com ***
    preet, Dec 13, 2005
    #3
  4. "KWilliams" <> wrote in message
    news:D...
    > I'd like to get some good advice about our old ASP site. You can see our
    > home
    > page at:
    > http://www.douglas-county.com/
    >
    > ...and an example application page at:
    > http://www.douglas-county.com/employment/currentopenings2.asp
    >
    > Our old site uses classic ASP with JavaScript syntax. I'm in the process
    > of
    > developing a new site that uses XML/XSLT/CSS/ASP.NET/VB.NET, but in the
    > meantime, we still have our old site up. It contains a lot of applications
    > that use SQL Server 2000 data, and we're having some major performance
    > issues.
    >
    > I already know that one issue is the use of tables for formatting, and I'm
    > already correcting that problem by using CSS Positioning with my new site.
    > Besides that, here are some of the issues that we're having:
    >
    > Different Browser Issues?
    > The site loads much quicker for me in Mozilla Firefox than it does in IE
    > 6.0
    > for some reason. If this difference is an obvious sign of something, I'd
    > love
    > to know what that could be.
    >
    > Connection Issues?
    > I've looked into whether this problem could be due to "leaky connections",
    > but this is how I have my connections set up:
    >
    Code:
    <%@language="javascript"%>
    > <%
    > var MM_strConn_STRING =
    > "Provider=SQLOLEDB;Server=SERVERNAME;Database=DBNAME;UID=UID;PWD=PWD"
    > %>
    > <%
    > var Recordset1 = Server.CreateObject("ADODB.Recordset");
    > Recordset1.ActiveConnection = MM_strConn_STRING;[/color]
    
    By setting ActiveConnection to a string, instead of a connection object, you
    are causing the recordset to create and open an implicit connection object
    that will not be implicitly closed.  One way to fix this is to explicitly
    create a connection object, set ActiveConnection to that, and close it after
    you're done.  The other way is to acquire a reference to ActiveConnection
    before closing the recordset, and call close on that reference after closing
    the recordset, e.g.,
    
    var cn = Recordset1.ActiveConnection;
    Recordset1.Close();
    cn.Close();
    
    The former is more conventional, and more effecient if you're using more
    than one recordset.  The latter must only be used when you're absolutely
    certain the connection is not being used elsewhere in your code.
    
    
    -Mark
    
    [color=blue]
    > Recordset1.Source = "SELECT *  FROM dbo.tblTABLENAME";
    > Recordset1.CursorType = 0;
    > Recordset1.CursorLocation = 2;
    > Recordset1.LockType = 3;
    > Recordset1.Open();
    > var Recordset1_numRows = 0;
    > %>
    > <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    > "http://www.w3.org/TR/html4/loose.dtd">
    > <html>
    > <body>...</body>
    > </html>
    > <%
    > Recordset1.Close();
    > %>
    >
    > The reason I'm looking at this as a possible cause is because my Network
    > Administrator states that when he restarts the SQL Server, the site loads
    > quicker. Then over time, it seems to get bogged down until the server is
    > restarted again. It loads much slower for some users than others for some
    > reason, and that's when they have the same browser version.
    >
    > Ok, that's it. If there are any other obvious causes of this issue, please
    > let me know. Any constructive criticism would be greatly appreciated.
    > Thanks.
    Mark J. McGinty, Dec 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. Junpei
    Replies:
    1
    Views:
    484
    Jim Gibson
    May 27, 2004
  2. PCC
    Replies:
    0
    Views:
    319
  3. Harvey
    Replies:
    0
    Views:
    669
    Harvey
    Jul 16, 2004
  4. Harvey
    Replies:
    1
    Views:
    818
    Daniel
    Jul 16, 2004
  5. Malcolm

    BASIC advice wanted.

    Malcolm, Jan 3, 2004, in forum: C Programming
    Replies:
    9
    Views:
    360
    Joona I Palaste
    Jan 4, 2004
Loading...

Share This Page