[thelist] (ASP) Connection time measurement

Paulo Guedes ramone at amazoniacelular.com.br
Tue May 14 15:37:01 CDT 2002


Hello,

I've been lurking for a while and this is my first mail to this list. I
hope someone can help me.

We have a huge application running on a IIS4 server. This app was not
developed by me, so I'm fixing up some errors I found and trying to
prevent some other errors.

One of the most common problem we have is when the connections to our
Oracle 7 database take too much time to open. Because we have too many
users and every page opens a new connection, more than one second will
be "too much time to open".

I'm wondering how I can measure whether these connections are taking too
long to open.

The basic code to do this is:

(...)
on error resume next
conn.ConnectionTimeout = 5
conn.open "xxxxx", user, pass

if conn.State = 0 then
    set conn = nothing
    Response.Redirect "errorpage.asp" ' tells the user that could not
open the connection
end if
(...)

I would like to know exactly how much time the connection took to open.
I've noticed that putting a line " t = time " before the Open method and
comparing " totaltime = time - t " does not work fine...

Cheers (and sorry if my English is too poor...),
Paulo Guedes




More information about the thelist mailing list