How can I capture the Script timeout Error?

Discussion in 'ASP General' started by Mathieu Blais, Sep 25, 2003.

  1. 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
     
    Mathieu Blais, Sep 25, 2003
    #1
    1. Advertising

  2. Mathieu Blais

    Ray at Guest

    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" <> wrote in message
    news:...
    > 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, Sep 25, 2003
    #2
    1. Advertising

  3. Mathieu Blais

    Matt Guest

    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:%...
    > 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" <> wrote in message
    > news:...
    > > 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
    > >
    > >

    >
    >
     
    Matt, Sep 25, 2003
    #3
  4. 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" <> wrote in message
    news:#...
    > 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..
     
    Aaron Bertrand - MVP, Sep 25, 2003
    #4
  5. Mathieu Blais

    Ray at Guest

    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" <> wrote in message
    news:%...
    > 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:%...
    > > 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" <> wrote in message
    > > news:...
    > > > 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, Sep 25, 2003
    #5
  6. Mathieu Blais

    Ray at Guest

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

    Ray at work
     
    Ray at, Sep 25, 2003
    #6
  7. Mathieu Blais

    Matt Guest

    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:...
    > Yes, and take Aaron's suggestion at determining what is causing the

    timeout.
    > What is causing it?
    >
    > Ray at work
    >
    >
     
    Matt, Sep 25, 2003
    #7
  8. Mathieu Blais

    Ray at Guest

    Did you not like the custom error page idea?

    Ray at work

    "Matt" <> wrote in message
    news:...
    > 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:...
    > > Yes, and take Aaron's suggestion at determining what is causing the

    > timeout.
    > > What is causing it?
    > >
    > > Ray at work
    > >
    > >

    >
    >
     
    Ray at, Sep 25, 2003
    #8
  9. Mathieu Blais

    Matt Guest

    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$...
    > Did you not like the custom error page idea?
    >
    > Ray at work
    >
    > "Matt" <> wrote in message
    > news:...
    > > 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:...
    > > > Yes, and take Aaron's suggestion at determining what is causing the

    > > timeout.
    > > > What is causing it?
    > > >
    > > > Ray at work
    > > >
    > > >

    > >
    > >

    >
    >
     
    Matt, Sep 29, 2003
    #9
    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. Bob Johnson
    Replies:
    0
    Views:
    3,777
    Bob Johnson
    Aug 7, 2003
  2. Max
    Replies:
    7
    Views:
    9,126
  3. Mark Probert

    Timeout::timeout and Socket timeout

    Mark Probert, Oct 6, 2004, in forum: Ruby
    Replies:
    1
    Views:
    1,293
    Brian Candler
    Oct 6, 2004
  4. vishnu
    Replies:
    0
    Views:
    366
    vishnu
    May 31, 2006
  5. vishnu
    Replies:
    0
    Views:
    207
    vishnu
    May 31, 2006
Loading...

Share This Page