ASP program degrade on more load issue

Posted on 2002-07-11
Medium Priority
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 268 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 268 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 264 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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

I would like to start this tip/trick by saying Thank You, to all who said that this could not be done, as it forced me to make sure that it could be accomplished. :) To start, I want to make sure everyone understands the importance of utilizing p…
This demonstration started out as a follow up to some recently posted questions on the subject of logging in: http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/Q_28634665.html and http://www.experts-exchange.com/Programming/…
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
Suggested Courses

762 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