If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > ASP > Script Timeout

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 02-18-03, 18:07
Shineyshoes Shineyshoes is offline
Registered User
 
Join Date: Jan 2003
Posts: 22
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?
Reply With Quote
  #2 (permalink)  
Old 02-19-03, 03:19
jjuliano jjuliano is offline
Registered User
 
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.



Quote:
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?
Reply With Quote
  #3 (permalink)  
Old 02-19-03, 10:38
Shineyshoes Shineyshoes is offline
Registered User
 
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?


Quote:
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.
Reply With Quote
  #4 (permalink)  
Old 02-19-03, 17:52
rhs98 rhs98 is offline
Super Moderator
 
Join Date: Feb 2002
Location: Hampshire, UK
Posts: 441
if you send me the code, I will gladly have a look and see if I can find the problem!
Reply With Quote
  #5 (permalink)  
Old 02-19-03, 17:56
Shineyshoes Shineyshoes is offline
Registered User
 
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

Quote:
Originally posted by rhs98
if you send me the code, I will gladly have a look and see if I can find the problem!
Reply With Quote
  #6 (permalink)  
Old 02-19-03, 18:42
rhs98 rhs98 is offline
Super Moderator
 
Join Date: Feb 2002
Location: Hampshire, UK
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
Reply With Quote
  #7 (permalink)  
Old 02-19-03, 20:03
Shineyshoes Shineyshoes is offline
Registered User
 
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

Quote:
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
Reply With Quote
  #8 (permalink)  
Old 02-19-03, 20:45
jjuliano jjuliano is offline
Registered User
 
Join Date: Feb 2003
Posts: 8
Re: Script Timeout

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

Quote:
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?
Reply With Quote
  #9 (permalink)  
Old 02-20-03, 17:33
rhs98 rhs98 is offline
Super Moderator
 
Join Date: Feb 2002
Location: Hampshire, UK
Posts: 441
Any luck?
Reply With Quote
  #10 (permalink)  
Old 03-03-03, 17:45
Shineyshoes Shineyshoes is offline
Registered User
 
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
Reply With Quote
  #11 (permalink)  
Old 03-03-03, 17:55
rhs98 rhs98 is offline
Super Moderator
 
Join Date: Feb 2002
Location: Hampshire, UK
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?
Reply With Quote
  #12 (permalink)  
Old 03-04-03, 09:16
Shineyshoes Shineyshoes is offline
Registered User
 
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
Reply With Quote
  #13 (permalink)  
Old 03-04-03, 09:20
Shineyshoes Shineyshoes is offline
Registered User
 
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
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On