ASP program degrade on more load issue

Posted on 2002-07-11
Last Modified: 2012-05-04
We are doing a new version of an ASP program.
The old one works fine when loaded with more than 300
hundred users.. However, we can't seem to find what
is the problem with the new version with similar load..
It slows down such that its unusable.

The old version just uses ASP and basic functions while
the new one uses ASP with VBScript classes.

When stress testing, the old version CPU goes up but
request wait time goes up and down.. while in the
new one, CPU goes up more - nearly max up and wait time
goes up and stays constant.

Any idea what we can check into?
Question by:ykf2000
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
LVL 20

Accepted Solution

jitganguly earned 67 total points
ID: 7146672
1. Database connections e.g. Make sure you close them
set rs=nothing
set conn=nothing

2. Close the instances of user defided DLL's and classes

3. Do not keep connections open. The best way is to open the connection, get the data, close the connection.

4. Try to filter records from backend e.g. use where cluase instead recordsert filters

5. Check your database table indexes

6. Close the instances of the classes when they are no longer needed.

7. For code table lookups, use joins to get the value. Do not go to backend to get his first name/last name from employee # etc.

8.If the session times out, force them to log back. Put this kind of code on top of each page
If seession("islogin")="" then
response.redirect "default.asp"
end if

These are certain guidelines. Unless we see the specific code, its hard to tell you
LVL 29

Assisted Solution

by:Göran Andersson
Göran Andersson earned 67 total points
ID: 7148829
First of all: moving to object oriented code is a step in the right direction. Object orientation is the best thing that happened to programming since Pascal.

Sadly enough, the support for OOP in VBscript (or VB either for that matter) is not very extensive. And object orientation in script languages means more overhead than in a compiled language. But still, it's a great step forward.

Because of the overhead, you have to be careful when implementing OOP in a script language. What normally goes for object orientation, is not always true when it's done in a script language.

For an example, properties are good, but unless you actually do something when setting or getting a property, a simple public variable is faster.

Don't use too many objects. For an example, instead of creating one object for each record in a recordset, just have one object where you can choose what record you want to read.

Do you have code for some small class of yours, that we could have a look at? It's hard to imagine everything that you may have come up with...

Assisted Solution

bfoust earned 66 total points
ID: 7148957
Here are some tips that i've used with success

+ use the ENABLESESSIONSTATE = False directive if your page does not require session management.

+ use the GetRows method of the recordset object to get your data into an array.  Close the DB connection immediately after.

+ Are you useing the Microsoft Web Site Stress Test tool?  If so, be sceptical of the results.  I've had times where the testing was dead on and other times where the testing absolutely KILLED the webserver but when set live, the site was fast as hell under the same load.

+ Its usually better to pass variables into your object through methods rather than using properties.  For example
myObject.MyProperty = "blue"

could be

myObject.RenderColor "blue" instead.  Thats just my opinion though, no hard facts really to support it.

** please provide code so we can better help you **
LVL 58

Expert Comment

ID: 8845372
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:
Split Points - bfoust / GreenGhost /  jitganguly
Please leave any comments here within the next seven days.
EE Cleanup Volunteer

Featured Post

Instantly Create Instructional Tutorials

Contextual Guidance at the moment of need helps your employees adopt to new software or processes instantly. Boost knowledge retention and employee engagement step-by-step with one easy solution.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I recently decide that I needed a way to make my pages scream on the net.   While searching around how I can accomplish this I stumbled across a great article that stated "minimize the server requests." I got to thinking, hey, I use more than one…
Hello, all! I just recently started using Microsoft's IIS 7.5 within Windows 7, as I just downloaded and installed the 90 day trial of Windows 7. (Got to love Microsoft for allowing 90 days) The main reason for downloading and testing Windows 7 is t…
This video Micro Tutorial shows how to password-protect PDF files with free software. Many software products can do this, such as Adobe Acrobat (but not Adobe Reader), Nuance PaperPort, and Nuance Power PDF, but they are not free products. This vide…
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…

691 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question