Results 1 to 13 of 13

Thread: Script Timeout

  1. #1
    Join Date
    Jan 2003
    Posts
    22

    Unanswered: Script Timeout

    I am getting the following error on my website, however it is not occuring at the same place all the time.

    Error Type:
    Active Server Pages, ASP 0113 (0x80004005)
    The maximum amount of time for a script to execute was exceeded. You can change this limit by specifying a new value for the property Server.ScriptTimeout or by changing the value in the IIS administration tools.
    /mysite/mypage.asp

    it happens very randomly on my site, and i have changed the server.scripttimeout = 0

    any insight?

  2. #2
    Join Date
    Feb 2003
    Posts
    8

    Re: Script Timeout

    Is there a looping on your code?

    This used to happen to me everytime i have a while...wend statement specially when retrieving records from db. The script times out when I forgot to put movenext like this:

    while not rs.eof
    your code here
    rs.movenext
    wend

    Don't forget the movenext or else your code will loop infinitely.



    Originally posted by Shineyshoes
    I am getting the following error on my website, however it is not occuring at the same place all the time.

    Error Type:
    Active Server Pages, ASP 0113 (0x80004005)
    The maximum amount of time for a script to execute was exceeded. You can change this limit by specifying a new value for the property Server.ScriptTimeout or by changing the value in the IIS administration tools.
    /mysite/mypage.asp

    it happens very randomly on my site, and i have changed the server.scripttimeout = 0

    any insight?

  3. #3
    Join Date
    Jan 2003
    Posts
    22

    Re: Script Timeout

    Yeah...but the weird thing is that if I hit Refresh, the code runs fine, and the page loads......Any thoughts?


    Originally posted by jjuliano
    Is there a looping on your code?

    This used to happen to me everytime i have a while...wend statement specially when retrieving records from db. The script times out when I forgot to put movenext like this:

    while not rs.eof
    your code here
    rs.movenext
    wend

    Don't forget the movenext or else your code will loop infinitely.

  4. #4
    Join Date
    Feb 2002
    Location
    San Francisco, CA
    Posts
    441
    if you send me the code, I will gladly have a look and see if I can find the problem!

  5. #5
    Join Date
    Jan 2003
    Posts
    22

    Dunno what to send

    Im not sure what to send you....i happens on different pages, at different times, with no consistancy. What shall i send?? My connection string, my code on the page??

    I hate errors like this one

    Originally posted by rhs98
    if you send me the code, I will gladly have a look and see if I can find the problem!

  6. #6
    Join Date
    Feb 2002
    Location
    San Francisco, CA
    Posts
    441
    Just thought of something before you start sending code; do you set all your objects (i.e. connections, recordsets etc) to equal nothing after you finish - This caused some major transient (is that the correct word???- random) problems for me. It seems IIS does not free the memory.

    Also using the file system object in my code with a norton anti virus caused random errors - I solved this by disabling the "script blocking" part of it.

    If you have done the above, we can work out what I can look at for you code wise

  7. #7
    Join Date
    Jan 2003
    Posts
    22

    Unhappy Oh....

    Yeah....there are probly a few items that i havnt set to nothing after im done using them....ill have to go threw my code and find them all......

    Debugging I go.

    Thanks
    Shineyshoes

    Originally posted by rhs98
    Just thought of something before you start sending code; do you set all your objects (i.e. connections, recordsets etc) to equal nothing after you finish - This caused some major transient (is that the correct word???- random) problems for me. It seems IIS does not free the memory.

    Also using the file system object in my code with a norton anti virus caused random errors - I solved this by disabling the "script blocking" part of it.

    If you have done the above, we can work out what I can look at for you code wise

  8. #8
    Join Date
    Feb 2003
    Posts
    8

    Re: Script Timeout

    The page you is see was probably been cached into the browser.

    Originally posted by Shineyshoes
    Yeah...but the weird thing is that if I hit Refresh, the code runs fine, and the page loads......Any thoughts?

  9. #9
    Join Date
    Feb 2002
    Location
    San Francisco, CA
    Posts
    441
    Any luck?

  10. #10
    Join Date
    Jan 2003
    Posts
    22

    Question

    not really sure if i am having luck or not.....I was still getting the error after setting all my variable to "nothing"

    so i changed my server.scritptimeout = 9999999999 and now i dont seem to be getting it....

    Weird
    Shineyshoes

  11. #11
    Join Date
    Feb 2002
    Location
    San Francisco, CA
    Posts
    441
    if you do this at the top of your code;
    Code:
    session("timer")=timer
    and this at the bottom
    Code:
    response.write timer-session("timer")
    it will tell you in seconds (with alot of decimal places) how long the script took to execute. You can also find out where the bottle neck is by putting similar code round big loops or queries. May help.

    Have you looked at why your scripts are running so long?

  12. #12
    Join Date
    Jan 2003
    Posts
    22
    my script should take a long time to execute....it is about 1700 lines of code with multiple loops.

    I guess i will just have to see if i can find ways to optimize this code and make the code as small as possible.

    its just annoying.
    Shineyshoes

  13. #13
    Join Date
    Jan 2003
    Posts
    22
    just for the record.....when i use your session("timer") method

    it comes up at about
    25700
    or so


    Shineyshoes

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •