|
 |
access_asp thread: Quick ASP serverscript.timeout question
Message #1 by saslaw@c... on Sat, 9 Nov 2002 22:38:55
|
|
Hi all. I have a quick question about setting the Server.ScriptTimeout.
Is it ok to set this to above one hour? I am running a very heavy script
which is needing to run for more than one hour. Every page is set to
Server.ScriptTimeout = 200000. Small runs on the DB take about 15 minutes
and function perfectlly. Large runs stop at exactly one hour, no error,
just times out.
Is there a limit to serverscript.timeout???
Message #2 by "Ken Schaefer" <ken@a...> on Mon, 11 Nov 2002 16:32:49 +1100
|
|
Maybe the browser is timing out waiting for a response from the server.
What are you doing in this ASP page? Surely you could do it better by
creating a .vbs file instead...
Cheers
Ken
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
From: <saslaw@c...>
Subject: [access_asp] Quick ASP serverscript.timeout question
: Hi all. I have a quick question about setting the Server.ScriptTimeout.
: Is it ok to set this to above one hour? I am running a very heavy script
: which is needing to run for more than one hour. Every page is set to
: Server.ScriptTimeout = 200000. Small runs on the DB take about 15 minutes
: and function perfectlly. Large runs stop at exactly one hour, no error,
: just times out.
:
: Is there a limit to serverscript.timeout???
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Message #3 by saslaw@c... on Mon, 11 Nov 2002 17:32:12
|
|
This is how it works without submitting the code. There ALOT of it.
Page 1. Submits a form based query to create3.asp Server.scripttimeout set
to 20000
Page 2.
step 1: Drop two tables from destination database.
step 2: Create two tables in destination database.
Here I am removing the existing data in the destination table. Basically
we recieve an access database full of items, then select which items in
that database to incorporate with the site database.
Step 3: Select the information from table one from the source database.
step 4: begin inserting the information into table one in the
destination database.
step 5: close connection 1 to the source database.
steps 6-8 repeat above steps for 2nd table.
Thats it. Small inserts of 17K items works fine, takes about 15 mintues.
But the bigger ones timeout at exactly one hour. Actually, I never even
receive a timeout message. After one hour the webpage goes blank, after
about another hour or so I get "page can not be found".
I have all pages set to 20000 for server.scripttimeout. Im going to play
around with the IIS today at work to see if there is a setting in there,
but I was curious if there is an ultimate limit.
Im not sure how to do this in .vbs.
Allen
> Maybe the browser is timing out waiting for a response from the server.
What are you doing in this ASP page? Surely you could do it better by
creating a .vbs file instead...
Cheers
Ken
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
From: <saslaw@c...>
Subject: [access_asp] Quick ASP serverscript.timeout question
: Hi all. I have a quick question about setting the Server.ScriptTimeout.
: Is it ok to set this to above one hour? I am running a very heavy script
: which is needing to run for more than one hour. Every page is set to
: Server.ScriptTimeout = 200000. Small runs on the DB take about 15 minutes
: and function perfectlly. Large runs stop at exactly one hour, no error,
: just times out.
:
: Is there a limit to serverscript.timeout???
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Message #4 by saslaw@c... on Mon, 11 Nov 2002 17:33:31
|
|
Oh yes, and this DID work once. I did a large search/input and it took
only 48 minutes. So im not sure why this isn't working. I didn't change
anything I don't believe.
Allen
> Maybe the browser is timing out waiting for a response from the server.
What are you doing in this ASP page? Surely you could do it better by
creating a .vbs file instead...
Cheers
Ken
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
From: <saslaw@c...>
Subject: [access_asp] Quick ASP serverscript.timeout question
: Hi all. I have a quick question about setting the Server.ScriptTimeout.
: Is it ok to set this to above one hour? I am running a very heavy script
: which is needing to run for more than one hour. Every page is set to
: Server.ScriptTimeout = 200000. Small runs on the DB take about 15 minutes
: and function perfectlly. Large runs stop at exactly one hour, no error,
: just times out.
:
: Is there a limit to serverscript.timeout???
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Message #5 by "Ken Schaefer" <ken@a...> on Tue, 12 Nov 2002 12:10:41 +1100
|
|
Here are my suggestions:
a) If you really need to do this using an .asp page then
i) Don't use Recordset's .AddNew(). If you go over a few thousand
records everything starts slowing down dramatically because the recordset is
in memory and keeps getting bigger and bigger. Instead, use SQL statements
to insert the data.
ii) If you have SQL Server as the destination database, then much of
this can be accomplished by using DTS instead of ASP
b) What I really recommend is that you use either DTS (but that can be a bit
hard to programmatically control) -or- a .vbs file. A .vbs file is the same
type of VBScript that you use in an ASP page, but instead of
Server.CreateObject() you use WScript.CreateObject(). You could store the
parameters of what you want to do in the database, then create a WSH.Shell
object in your ASP page. This gives you a command prompt which will allow
you to run the .vbs file. The benefit is that you can avoid waiting for the
.vbs file to finish (ie it continues to run in the background whilst your
ASP page finishes).
You can get information on Windows Script Host, and plenty of samples here:
http://msdn.microsoft.com/scripting/
c) When you say that "after an hour the browser says it can't find the
server", this is the browser timing out. It's not getting any response from
the server, so it gives up waiting.
Cheers
Ken
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
From: <saslaw@c...>
Subject: [access_asp] Re: Quick ASP serverscript.timeout question
: This is how it works without submitting the code. There ALOT of it.
: Page 1. Submits a form based query to create3.asp Server.scripttimeout set
: to 20000
: Page 2.
: step 1: Drop two tables from destination database.
: step 2: Create two tables in destination database.
: Here I am removing the existing data in the destination table. Basically
: we recieve an access database full of items, then select which items in
: that database to incorporate with the site database.
: Step 3: Select the information from table one from the source database.
: step 4: begin inserting the information into table one in the
: destination database.
: step 5: close connection 1 to the source database.
: steps 6-8 repeat above steps for 2nd table.
:
: Thats it. Small inserts of 17K items works fine, takes about 15 mintues.
: But the bigger ones timeout at exactly one hour. Actually, I never even
: receive a timeout message. After one hour the webpage goes blank, after
: about another hour or so I get "page can not be found".
:
: I have all pages set to 20000 for server.scripttimeout. Im going to play
: around with the IIS today at work to see if there is a setting in there,
: but I was curious if there is an ultimate limit.
:
: Im not sure how to do this in .vbs.
:
: Allen
:
:
:
:
: > Maybe the browser is timing out waiting for a response from the server.
:
: What are you doing in this ASP page? Surely you could do it better by
: creating a .vbs file instead...
:
: Cheers
: Ken
:
: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
: From: <saslaw@c...>
: Subject: [access_asp] Quick ASP serverscript.timeout question
:
:
: : Hi all. I have a quick question about setting the Server.ScriptTimeout.
: : Is it ok to set this to above one hour? I am running a very heavy script
: : which is needing to run for more than one hour. Every page is set to
: : Server.ScriptTimeout = 200000. Small runs on the DB take about 15
minutes
: : and function perfectlly. Large runs stop at exactly one hour, no error,
: : just times out.
: :
: : Is there a limit to serverscript.timeout???
:
: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Message #6 by Bhupendra_Sharma@r... on Thu, 14 Nov 2002 10:22:05 +0530
|
|
I don't claim that I'm a mastro in doing this but my suggestions are as
under if it helps you.
I think you should use stored procedures for the same. This should
drastically save your time on the database part. Also in order to keep your
page alive for a longer time you can try response.flush at logical
intervals. Rather than droping the table and recreating them try truncate
table instead.
regards
saslaw@c...
t To: "Access ASP" <access_asp@p...>
cc:
11/11/2002 11:02 Subject: [access_asp] Re: Quick ASP serverscript.timeout
PM question
Please respond to
"Access ASP"
This is how it works without submitting the code. There ALOT of it.
Page 1. Submits a form based query to create3.asp Server.scripttimeout set
to 20000
Page 2.
step 1: Drop two tables from destination database.
step 2: Create two tables in destination database.
Here I am removing the existing data in the destination table. Basically
we recieve an access database full of items, then select which items in
that database to incorporate with the site database.
Step 3: Select the information from table one from the source database.
step 4: begin inserting the information into table one in the
destination database.
step 5: close connection 1 to the source database.
steps 6-8 repeat above steps for 2nd table.
Thats it. Small inserts of 17K items works fine, takes about 15 mintues.
But the bigger ones timeout at exactly one hour. Actually, I never even
receive a timeout message. After one hour the webpage goes blank, after
about another hour or so I get "page can not be found".
I have all pages set to 20000 for server.scripttimeout. Im going to play
around with the IIS today at work to see if there is a setting in there,
but I was curious if there is an ultimate limit.
Im not sure how to do this in .vbs.
Allen
> Maybe the browser is timing out waiting for a response from the server.
What are you doing in this ASP page? Surely you could do it better by
creating a .vbs file instead...
Cheers
Ken
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
From: <saslaw@c...>
Subject: [access_asp] Quick ASP serverscript.timeout question
: Hi all. I have a quick question about setting the Server.ScriptTimeout.
: Is it ok to set this to above one hour? I am running a very heavy script
: which is needing to run for more than one hour. Every page is set to
: Server.ScriptTimeout = 200000. Small runs on the DB take about 15 minutes
: and function perfectlly. Large runs stop at exactly one hour, no error,
: just times out.
:
: Is there a limit to serverscript.timeout???
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
 |