473,396 Members | 2,111 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Script timed out, error ASP 0113???

I sometimes get this error after about 60 seconds of "waiting for
mazes.com" (but when the page works, it usually loads in less than 12
seconds).
Active Server Pages error 'ASP 0113'
Script timed out
/asp-maze/amazingtest.asp
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.


but if I click refresh, I usually get the page.

There is a very remote chance that there might be a loop causing this
problem, but I don't think so. I've added timer-checks to the loops
that might cause a problem, and have added other escape methods to
other places that I think have caused the problem.

My questions:

1) Can the system be set to tell what line of the program was executing
when it timed out? (This would certainly help figure out if there's a
particular place that is causing an occasional problem). I'd have to
tell my hosting person how to do it, so be specific if you can.

2) Could this be caused by too many people accessing ASP pages at the
same time? How would he increase the number of users allowed to be
loading pages simultaneously?

3) What steps would he use to reduce the time for this parameter, or
should I reduce it. 60 seconds seems awfully long, but I do have
another page that I

John

Jan 12 '06 #1
11 24116
www.MessageMazes.com wrote:
I sometimes get this error after about 60 seconds of "waiting for
mazes.com" (but when the page works, it usually loads in less than 12
seconds).
Active Server Pages error 'ASP 0113'
Script timed out
/asp-maze/amazingtest.asp
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.
but if I click refresh, I usually get the page.

There is a very remote chance that there might be a loop causing this
problem, but I don't think so. I've added timer-checks to the loops
that might cause a problem, and have added other escape methods to
other places that I think have caused the problem.

My questions:

1) Can the system be set to tell what line of the program was
executing when it timed out?


Not that I know of. You will need to add some logging functionality to your
application so you can see what was happening.
2) Could this be caused by too many people accessing ASP pages at the
same time? How would he increase the number of users allowed to be
loading pages simultaneously?
Maybe. What is occurring in that loop?

3) What steps would he use to reduce the time for this parameter, or
You can do it yourself by adding a
Server.ScriptTimeout = 120

command in your page. Not that I recommend doing this ...
should I reduce it. 60 seconds seems awfully long, but I do have
another page that I


John? John?? Are you ok? OMIGOD, JOHN'S BEEN KIDNAPPED BY ALIENS!! ;-)

Bob Barrows
--
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.
Jan 12 '06 #2
Bob Barrows [MVP] wrote:
should I reduce it. 60 seconds seems awfully long, but I do have
another page that I


John? John?? Are you ok? OMIGOD, JOHN'S BEEN KIDNAPPED BY ALIENS!! ;-)


Oh wait. False alarm. He hit another timeout, right?
--
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.
Jan 12 '06 #3
Dude, have you seen john? It's been like atleast 61 seconds.
I'm beginning to get worried. My cats disappeared in a wind-
storm at the same time he disappeared. -_wierd_- no?
Lets see what an error 0113 is...

maximum amount of time that a script can run before it is
terminated. The error is generated when the processing time
of the script exceeds the maximum value that has been
designated for the ScriptTimeout property.

NOTE: An increase in timeout value can have a negative effect
on server performance. You should design scripts that run
within the default timeout settings. For example, an increase
in script timeout value can keep IIS threads occupied and
reduce the number of users that the server can serve.

Have you tried loading the page, and then not waiting for it
to come back, but rather, hitting F5 about 5 seconds after you
make the first request? Does the second request come back any
faster?

It does not have to be loops... it could be a query that's not
coming back because of a bad or non-existant index or possibly
someone has chosen not to create primary keys on the tables for
that data?

Are there any conditional statements that might block against
another resource? or something that's not casting properly or
is null at the time of comparison?
D?

Bob Barrows [MVP] wrote:
Bob Barrows [MVP] wrote:
should I reduce it. 60 seconds seems awfully long, but I do have
another page that I


John? John?? Are you ok? OMIGOD, JOHN'S BEEN KIDNAPPED BY ALIENS!! ;-)

Oh wait. False alarm. He hit another timeout, right?

Jan 12 '06 #4
Sorry, I didn't realize I hadn't finished my first post. I'd gone off to
do something else, then when I came back, saw I hadn't sent the message,
so I sent it without rereading it.

(You can blame my ADHD)

The pages in question, if anyone cares to try them (and generate your
own maze while you're at it) are

http://www.mazes.com/asp-maze/amazing.asp

but rather than start there, start with one of these feeder pages:

http://www.messagemazes.com/Merit/WebAuthor.htm
http://www.messagemazes.com/Merit/Webmaster.htm
http://www.messagemazes.com/Merit/ComputerGuru.htm

Then you can test the program by putting your name into the box and get
personalized results.

For grins, and because it just occurred to me to try it, I added code to
tell me how many seconds of time it took to generate the code for each
page. The simple maze page is taking on the general order of around one
to four seconds (three tests, 1.5, 3.3 and 3.3 seconds for a 95x59
maze), and the harder maze page took over half-a-minute (two tests, 36.5
and 37.3 seconds) for a 203x93 personalized maze.

So, as you can guess, I don't want to reduce my script timeout much
lower than 60, though when I get the error, it's usually after 120
seconds, so I wonder if it even started running the script or not????

Any ideas will be appreciated.

John
www.MAZES.com
www.MessageMazes.com
www.GodLovesEveryone.org
etcetera

*** Sent via Developersdex http://www.developersdex.com ***
Jan 12 '06 #5
John wrote:
So, as you can guess, I don't want to reduce my script timeout much
lower than 60, though when I get the error, it's usually after 120
seconds, so I wonder if it even started running the script or not????

Any ideas will be appreciated.


Sorry, but without seeing code, we can only guess. You need to narrow it
down to something we can look at in a newsgroup post ... or hire a
consultant.

Bob Barrows
--
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.
Jan 12 '06 #6
It occurred to me on the way home from various appointments this
afternoon that part of the problem might be that I'm creating all the
HTML code in memory, then writing it with <%=variable%> parameters
inside the actual HTML code at the bottom of the ASP page.

And if it works like some BASIC interpreters I've used in the deep dark
past (I cut my teeth on BASIC in 1977), then it may sometimes stop to do
garbage collection because I keep concatenating one string longer and
longer.

So, I added some code to see what parts of my program were taking how
long:

http:
(Seconds)
0.00 to 0.00: Various initializations
0:00 to 0:02: Read and Write various files
0:02 to 0:05: Block the word pixels into the numeric array
(I don't expect that statement to make sense to you)
0:05 to 0.99: Create the numeric maze array
0:99 to 3.34: CREATE MAZE AS HTML IN MEMORY
3.34 to 3.36: Create other values that will be written
TOTAL TIME: 3.355469 seconds

It was similar when I tried the same thing with the program that creates
a maze with an area over three times bigger:

0.00 to 0.03: Initialize, read and write various files
0.03 to 0.11: Putting word pixels into numeric array
0.11 to 3.09: Create numeric maze array
3.09 to 35.41: CREATE MAZE AS HTML IN MEMORY
35.41 to 35.42: Everything else, down to just before </BODY>
(which I assume includes putting HTML into the stream down to the user?)

Obviously, my slowest routine is creating the HTML and holding it in
memory. Would I be better off actually sending the code into the web
page stream instead of holding it in memory and putting it out with
<%=variablename%>?

And how should I do that if that makes more sense? I hadn't gotten
around to learning that yet. I've been teaching myself ASP by trial and
error, looking some stuff up at
http://msdn.microsoft.com/library/de.../en-us/script5
6/html/ddfa5183-d458-41bc-a489-070296ced968.asp and just really getting
into it in October.

Thanks for all the great advice so far.

John
www.MAZES.com
www.MessageMazes.com
www.GodLovesEveryone.org
etcetera
(John {at} any of these domains)

*** Sent via Developersdex http://www.developersdex.com ***
Jan 13 '06 #7
I hit the search engine, and am guessing that

Response.Write

is what I should be studying next, just in case someone was getting
ready to tell this idiot that he should have learned that in a "hello
world" application, which he skipped.

John
www.MAZES.com
www.MessageMazes.com
www.GodLovesEveryone.org
etcetera

*** Sent via Developersdex http://www.developersdex.com ***
Jan 13 '06 #8
SUCCESS!!!!!

Response.Write

was exactly what I needed to learn next.

The test page at
http://mazes.com/asp-maze/amazingwri...ster&cat=merit

says that it did all the processing in 2.3125 seconds, and that was for
the HARDER maze.

Later tonight, I'll work on updating the other ASP pages to do it the
same way.

Thanks for all the advice, and if you have any other ideas for me, feel
free to shoot them my way.

John
www.MAZES.com
www.MessageMazes.com
www.GodLovesEveryone.org
etcetera

*** Sent via Developersdex http://www.developersdex.com ***
Jan 13 '06 #9
John wrote:
It occurred to me on the way home from various appointments this
afternoon that part of the problem might be that I'm creating all the
HTML code in memory, then writing it with <%=variable%>
parameters inside the actual HTML code at the bottom of the ASP page.

And if it works like some BASIC interpreters I've used in the deep
dark past (I cut my teeth on BASIC in 1977), then it may sometimes
stop to do garbage collection because I keep concatenating one string
longer and longer.


VB/VBA/vbscript are notoriously inefficient where this is concerned. A
better method is to initialize an array large enough to contain all the
strings you will will need, add the strings to the array and then, use
Join() to put them together when you write the html to response.

--
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.
Jan 13 '06 #10
<< VB/VBA/vbscript are notoriously inefficient where this is concerned.
A better method is to initialize an array large enough to contain all
the strings you will will need, add the strings to the array and then,
use Join() to put them together when you write the html to response. >>

Hi, Bob,

That sounds partially like what I intended, though I made one
improvement since yesterday that brings it closer to what you said.

Here is what I have for that part of the logic right now (you should
have seen how complicated it was ten minutes ago before I moved part of
the logic into the c1c2 array):

FOR r = 1 TO mazeh + 1 STEP 2
FOR c = 0 TO mazew
:Response.Write imagesource(c1c2(g(r,c)),c1c2(g(r+1,c)))
:NEXT: Response.Write"<BR>"
NEXT

If I were creating a "Bob Is An Amazing Webmaster" maze with my hollow
alphabet
(http://mazes.com/asp-maze/amazing15....t=merit&firstn
ame=bob), the inner statements would be executed 7,379 times because
that particular puzzle is 156 cells wide by 93 cells tall.

I finally found JOIN (was looking under statements until I reread your
statement and saw that it's a function), but it looks like it won't help
me here. I wish the example was better at msdn.

I use this as my source for syntax:
http://msdn.microsoft.com/library/de.../en-us/script5
6/html/ddfa5183-d458-41bc-a489-070296ced968.asp
Do you recommend a better source?

I did see that the WRITE method allows multiple strings:
Debug.Write([str1 [, str2 [, ... [, strN]]]])


So am I guessing correctly that:

Response.Write text1, text2, text3

works identically, as far as the final result is concerned, as:

Response.Write text1 & text2 & text3

and that the first would probably be faster?

I'm also happy to see that there is a WriteLine as there are a few cases
where a new line character is apparently required in code, like when
using Google Adsense code.

John
www.MAZES.com
www.MessageMazes.com
www.GodLovesEveryone.org
etcetera

*** Sent via Developersdex http://www.developersdex.com ***
Jan 13 '06 #11
I found out, by trial and error that

1) WriteLine does not work with Response

2) Response.Write may only have one item to write

So much for that idea. Fortunately, I only tested it with 11 lines of
code, so it was easy to put back to the way it was.

John
www.MAZES.com
www.MessageMazes.com
www.GodLovesEveryone.org
etcetera

*** Sent via Developersdex http://www.developersdex.com ***
Jan 13 '06 #12

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Surajit Laha | last post by:
Hi, I am suffering from a strange problem! I was porting my ASP pages from one server to the other (both Win 2000 Ad. Server). While I ported the reports it is not running at all at the new...
5
by: Abby Lee | last post by:
My code does what I want (works unless there is a lot of volume...works for this month cause not a lot of items marked paid yet...) but the page times out for last month because there is just so...
1
by: Anzu | last post by:
I've been working on a script that finds and updates a record in database based on the user's input. When I try it I get this error: Active Server Pages, ASP 0113 (0x80004005) The maximum...
13
by: Patrick | last post by:
I understand that with IIS5.1 on Windows XP Professional SP1, I can 1) Either set under IIS Manager-> Any specific Virtual Directory-> Configuration->Options->ASP Script timeout for all pages...
13
by: Prabhat | last post by:
Hi Friends, I have code that will "BinaryWrite" a EXE file of 20mb to client using the ADO Stream. After the download the EXE file works fine without any problem. When I verified the EXE that...
2
by: Usama Zulfiqar | last post by:
Hello guyz, One of my colleagues has made an upload website. We upload big data over the server via asp. Whenever I wanted to upload 5Mb file or more i receive ASP 0113 error. Is there any way...
1
by: george | last post by:
Hi all, here's my index.asp file. I don't know where has gone wrong. can't run properly, just showing error ASP 0113 Script timeout <!--#include file="head.asp"--> <!-- begin...
2
by: Darshini | last post by:
Hi When im opening my asp pages im getting this error Script timed out <file>.asp, line <line> The maximum amount of time for a script to execute was exceeded
3
by: =?Utf-8?B?SnVzdGluIERvaA==?= | last post by:
I am constantly getting the 'Script timed out' error, and would like to see if there is any way I could modify the ASP page. I think I did all I could to improved the performance at the database...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.