Connecting Tech Pros Worldwide Help | Site Map

How can I capture the Script timeout Error?

Mathieu Blais
Guest
 
Posts: n/a
#1: Jul 19 '05
Hi,

I need to capture the Script timeout error if that is possible. I know I can
increase the timeout value in the server settings or in the scripts itself
but I really want to make sure that no timeout situation will results as the
standard script timeout error page.

Can we do this ??

Help please.
Matt


Ray at
Guest
 
Posts: n/a
#2: Jul 19 '05

re: How can I capture the Script timeout Error?


Turn off buffering and response.write during your loop. There isn't going
to be any scripting error if your page times out, so you have to find what
is causing things to take so long. It's often an endless loop.

Ray at work

"Mathieu Blais" <mblais@cmtek.com> wrote in message
news:OGlUGa3gDHA.3828@tk2msftngp13.phx.gbl...[color=blue]
> Hi,
>
> I need to capture the Script timeout error if that is possible. I know I[/color]
can[color=blue]
> increase the timeout value in the server settings or in the scripts itself
> but I really want to make sure that no timeout situation will results as[/color]
the[color=blue]
> standard script timeout error page.
>
> Can we do this ??
>
> Help please.
> Matt
>
>[/color]


Matt
Guest
 
Posts: n/a
#3: Jul 19 '05

re: How can I capture the Script timeout Error?


Thanks Ray,

But how can I know that I have hit the time out ? Because I understand your
answer and it make sens but I don't just want not to receive any error
message, I want to know when it's happening in order to display a friendly
error message instead of the IIS error..

Matt


"Ray at <%=sLocation%>" <myfirstname at lane34 dot com> wrote in message
news:%23F4tPc3gDHA.1088@TK2MSFTNGP10.phx.gbl...[color=blue]
> Turn off buffering and response.write during your loop. There isn't going
> to be any scripting error if your page times out, so you have to find what
> is causing things to take so long. It's often an endless loop.
>
> Ray at work
>
> "Mathieu Blais" <mblais@cmtek.com> wrote in message
> news:OGlUGa3gDHA.3828@tk2msftngp13.phx.gbl...[color=green]
> > Hi,
> >
> > I need to capture the Script timeout error if that is possible. I know I[/color]
> can[color=green]
> > increase the timeout value in the server settings or in the scripts[/color][/color]
itself[color=blue][color=green]
> > but I really want to make sure that no timeout situation will results as[/color]
> the[color=green]
> > standard script timeout error page.
> >
> > Can we do this ??
> >
> > Help please.
> > Matt
> >
> >[/color]
>
>[/color]


Aaron Bertrand - MVP
Guest
 
Posts: n/a
#4: Jul 19 '05

re: How can I capture the Script timeout Error?


Set the timeout to something ridiculously high, then write better code and
fix the timeout problem. I don't believe you can trap a script timeout
error.




"Matt" <mblais@cmtek.com> wrote in message
news:#6bkNh3gDHA.3784@tk2msftngp13.phx.gbl...[color=blue]
> Thanks Ray,
>
> But how can I know that I have hit the time out ? Because I understand[/color]
your[color=blue]
> answer and it make sens but I don't just want not to receive any error
> message, I want to know when it's happening in order to display a friendly
> error message instead of the IIS error..[/color]


Ray at
Guest
 
Posts: n/a
#5: Jul 19 '05

re: How can I capture the Script timeout Error?


Ah, I see. Create a custom error page (500).

<%
Dim oError
Set oError = Server.GetLastError
Response.Write "Sorry, there was an error. The error was " &
oErr.Description
Set oError = Nothing

%>


Ray at work

"Matt" <mblais@cmtek.com> wrote in message
news:%236bkNh3gDHA.3784@tk2msftngp13.phx.gbl...[color=blue]
> Thanks Ray,
>
> But how can I know that I have hit the time out ? Because I understand[/color]
your[color=blue]
> answer and it make sens but I don't just want not to receive any error
> message, I want to know when it's happening in order to display a friendly
> error message instead of the IIS error..
>
> Matt
>
>
> "Ray at <%=sLocation%>" <myfirstname at lane34 dot com> wrote in message
> news:%23F4tPc3gDHA.1088@TK2MSFTNGP10.phx.gbl...[color=green]
> > Turn off buffering and response.write during your loop. There isn't[/color][/color]
going[color=blue][color=green]
> > to be any scripting error if your page times out, so you have to find[/color][/color]
what[color=blue][color=green]
> > is causing things to take so long. It's often an endless loop.
> >
> > Ray at work
> >
> > "Mathieu Blais" <mblais@cmtek.com> wrote in message
> > news:OGlUGa3gDHA.3828@tk2msftngp13.phx.gbl...[color=darkred]
> > > Hi,
> > >
> > > I need to capture the Script timeout error if that is possible. I know[/color][/color][/color]
I[color=blue][color=green]
> > can[color=darkred]
> > > increase the timeout value in the server settings or in the scripts[/color][/color]
> itself[color=green][color=darkred]
> > > but I really want to make sure that no timeout situation will results[/color][/color][/color]
as[color=blue][color=green]
> > the[color=darkred]
> > > standard script timeout error page.
> > >
> > > Can we do this ??
> > >
> > > Help please.
> > > Matt
> > >
> > >[/color]
> >
> >[/color]
>
>[/color]


Ray at
Guest
 
Posts: n/a
#6: Jul 19 '05

re: How can I capture the Script timeout Error?


Yes, and take Aaron's suggestion at determining what is causing the timeout.
What is causing it?

Ray at work


Matt
Guest
 
Posts: n/a
#7: Jul 19 '05

re: How can I capture the Script timeout Error?


Oh I have no control on that, the script timeout because of the response
time of a distant database server and I have no control on it's performance
so I was wondering if I had any possibilities to trap this error.

Thanks anyway everybody. I'll do it like I was going to in the first place.
Increasing the timeout.


"Ray at <%=sLocation%>" <myfirstname at lane34 dot com> wrote in message
news:eDrBLG4gDHA.956@TK2MSFTNGP09.phx.gbl...[color=blue]
> Yes, and take Aaron's suggestion at determining what is causing the[/color]
timeout.[color=blue]
> What is causing it?
>
> Ray at work
>
>[/color]


Ray at
Guest
 
Posts: n/a
#8: Jul 19 '05

re: How can I capture the Script timeout Error?


Did you not like the custom error page idea?

Ray at work

"Matt" <mblais@cmtek.com> wrote in message
news:ecN4GC5gDHA.2124@TK2MSFTNGP12.phx.gbl...[color=blue]
> Oh I have no control on that, the script timeout because of the response
> time of a distant database server and I have no control on it's[/color]
performance[color=blue]
> so I was wondering if I had any possibilities to trap this error.
>
> Thanks anyway everybody. I'll do it like I was going to in the first[/color]
place.[color=blue]
> Increasing the timeout.
>
>
> "Ray at <%=sLocation%>" <myfirstname at lane34 dot com> wrote in message
> news:eDrBLG4gDHA.956@TK2MSFTNGP09.phx.gbl...[color=green]
> > Yes, and take Aaron's suggestion at determining what is causing the[/color]
> timeout.[color=green]
> > What is causing it?
> >
> > Ray at work
> >
> >[/color]
>
>[/color]


Matt
Guest
 
Posts: n/a
#9: Jul 19 '05

re: How can I capture the Script timeout Error?


Yes that's a great idea but unfortunately Im working with IIS 4.0 and
correct me if I'm worng but ASP 2.0 does not support this method? But even
if I can't use it I would have a couple of question for my personnal
benefit. I have never used that kind of Custom Error page. How does that
work ? Where do you save it ? Does it need to have a specefic name or
something ?

Thank you very much for your help.

Matt

"Ray at <%=sLocation%>" <myfirstname at lane34 dot com> wrote in message
news:O$aGIG5gDHA.408@TK2MSFTNGP10.phx.gbl...[color=blue]
> Did you not like the custom error page idea?
>
> Ray at work
>
> "Matt" <mblais@cmtek.com> wrote in message
> news:ecN4GC5gDHA.2124@TK2MSFTNGP12.phx.gbl...[color=green]
> > Oh I have no control on that, the script timeout because of the response
> > time of a distant database server and I have no control on it's[/color]
> performance[color=green]
> > so I was wondering if I had any possibilities to trap this error.
> >
> > Thanks anyway everybody. I'll do it like I was going to in the first[/color]
> place.[color=green]
> > Increasing the timeout.
> >
> >
> > "Ray at <%=sLocation%>" <myfirstname at lane34 dot com> wrote in message
> > news:eDrBLG4gDHA.956@TK2MSFTNGP09.phx.gbl...[color=darkred]
> > > Yes, and take Aaron's suggestion at determining what is causing the[/color]
> > timeout.[color=darkred]
> > > What is causing it?
> > >
> > > Ray at work
> > >
> > >[/color]
> >
> >[/color]
>
>[/color]


Closed Thread


Similar ASP / Active Server Pages bytes