Dealing with script timeout

Discussion in 'ASP General' started by michal, Mar 29, 2007.

  1. michal

    michal Guest

    hi guys,
    i was wondering how you deal with script timeouts caused by huge file
    uploads. Lets say I have a script timeout of 2 minutes and the user
    uploads a file which takes more than this ...
    Whats the best way to inform the user about this issue rather than
    throwing the script timeout error.
    What approaches do you use for this....
    michal, Mar 29, 2007
    #1
    1. Advertising

  2. michal wrote:
    > hi guys,
    > i was wondering how you deal with script timeouts caused by huge file
    > uploads. Lets say I have a script timeout of 2 minutes and the user
    > uploads a file which takes more than this ...
    > Whats the best way to inform the user about this issue rather than
    > throwing the script timeout error.
    > What approaches do you use for this....


    Ummmm ... increase the script timeout on the page that does the upload?
    Search www.aspfaq.com for "timeout"
    --
    Microsoft MVP -- ASP/ASP.NET
    Please reply to the newsgroup. The email account listed in my From
    header is my spam trap, so I don't check it very often. You will get a
    quicker response by posting to the newsgroup.
    Bob Barrows [MVP], Mar 29, 2007
    #2
    1. Advertising

  3. michal

    michal Guest

    ya i know that i could increase the script timeout but this seems not
    a solution to me. because if i increase it to lets say 20 minutes and
    then someone comes with an even bigger file (or slow connection) which
    takes longer to upload then i have the same problem. and i am thrown
    back to the start in increasing it again and again ...
    i checkd aspfaq but they have no approaches for this problem.
    do you have any other ideas?
    michal, Mar 29, 2007
    #3
  4. michal

    Bob Lehmann Guest

    Q - I have to drive my car 100 miles, but I keep running out of gas because
    I only keep up to 3 gallons of gas in my car, which gets 20 mpg. What can I
    do?

    A - Put 5 gallons of gas in your car.

    Q - That won't work. What if I have to drive 120 miles some other time, or
    140 miles? I'd have to keep putting more gas in the car.

    A - Sell your car and ride the bus.

    Bob Lehmann



    "michal" <> wrote in message
    news:...
    > ya i know that i could increase the script timeout but this seems not
    > a solution to me. because if i increase it to lets say 20 minutes and
    > then someone comes with an even bigger file (or slow connection) which
    > takes longer to upload then i have the same problem. and i am thrown
    > back to the start in increasing it again and again ...
    > i checkd aspfaq but they have no approaches for this problem.
    > do you have any other ideas?
    >
    Bob Lehmann, Mar 30, 2007
    #4
  5. michal

    michal Guest

    :)
    so i am gonna buy a bus, just tell me where i can get one for my
    problem ;)
    michal, Mar 30, 2007
    #5
  6. "michal" <> wrote in message
    news:...
    > hi guys,
    > i was wondering how you deal with script timeouts caused by huge file
    > uploads. Lets say I have a script timeout of 2 minutes and the user
    > uploads a file which takes more than this ...
    > Whats the best way to inform the user about this issue rather than
    > throwing the script timeout error.
    > What approaches do you use for this....
    >


    What's the maximum amount of time you are willing to put up with a user
    trying to upload a file into your asp page?

    Set your script timeout to that.
    Anthony Jones, Mar 30, 2007
    #6
  7. michal

    michal Guest

    yeah i know i can do this... so there is no real approach to tell the
    user about the error?
    oh i think i could catch all errors and check if the timeout error
    happend. if this is the case i show a user friendly message...

    On Mar 30, 1:36 pm, "Anthony Jones" <> wrote:
    > "michal" <> wrote in message
    >
    > news:...
    >
    > > hi guys,
    > > i was wondering how you deal with script timeouts caused by huge file
    > > uploads. Lets say I have a script timeout of 2 minutes and the user
    > > uploads a file which takes more than this ...
    > > Whats the best way to inform the user about this issue rather than
    > > throwing the script timeout error.
    > > What approaches do you use for this....

    >
    > What's the maximum amount of time you are willing to put up with a user
    > trying to upload a file into your asp page?
    >
    > Set your script timeout to that.
    michal, Mar 31, 2007
    #7
  8. "michal" <> wrote in message
    news:...
    > yeah i know i can do this... so there is no real approach to tell the
    > user about the error?
    > oh i think i could catch all errors and check if the timeout error
    > happend. if this is the case i show a user friendly message...
    >


    Do you mean a custom 500.100 error page?
    Anthony Jones, Mar 31, 2007
    #8
  9. michal

    michal Guest

    no i dont really need it because i should be able to do it with
    on error resume next... have to try it the next time @ work.

    On Mar 31, 9:46 pm, "Anthony Jones" <> wrote:
    > "michal" <> wrote in message
    >
    > news:...
    >
    > > yeah i know i can do this... so there is no real approach to tell the
    > > user about the error?
    > > oh i think i could catch all errors and check if the timeout error
    > > happend. if this is the case i show a user friendly message...

    >
    > Do you mean a custom 500.100 error page?
    michal, Apr 1, 2007
    #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,724
    Bob Johnson
    Aug 7, 2003
  2. Do
    Replies:
    2
    Views:
    6,327
  3. Guoqi Zheng
    Replies:
    4
    Views:
    12,997
    Guoqi Zheng
    Jun 3, 2004
  4. Mark Probert

    Timeout::timeout and Socket timeout

    Mark Probert, Oct 6, 2004, in forum: Ruby
    Replies:
    1
    Views:
    1,251
    Brian Candler
    Oct 6, 2004
  5. Joe
    Replies:
    2
    Views:
    96
    Ron Savage
    Aug 29, 2005
Loading...

Share This Page