Re: Script taking longer than expected to complete: Consequences?

From: Ray Costanzo [MVP] (my)
Date: 10/13/04


Date: Wed, 13 Oct 2004 11:58:30 -0400

If the user closes the browser window, the script will continue to run on
the server. Once the request is made to the server, it starts doing what it
has to do and runs until it's finished (or errors out, times out, whatever).
Asuming that you cannot do anything about the duration of the database
operations, perhaps you'll be interested in some of the ideas here.
http://www.aspfaq.com/show.asp?id=2194

Ray at work

"Colin Steadman" <google@colinsteadman.com> wrote in message
news:4062dca4.0410130753.4a1a450f@posting.google.com...
> I've setup a very simple page which allows a group of users to start a
> procedure in Oracle from an ASP page (relevant code copied below). I
> was led to believe that the processing job was fairly quick and would
> only take a minute to complete.
>
> However to my disappointment, having only built and deployed the page
> a few days ago, I've already had a call from one of the users who
> tells me that its just timed out on them (timeout currently occurs
> after 90 seconds). I've made a quick mod to the page and used
> Server.ScriptTimeout 600 to give the script plenty of time to
> complete.
>
> However I'm now concerned about what would happen if the user
> interrupted processing mid-way through by accidently closing the
> browser window or something. What would happen on the database in
> this situation?
>
> To get around the problem I'm thinking about putting a transaction
> around the execution part of the code. But would this work if the all
> the SQL is doing is starting an Oracle procedure? I've only ever used
> it with straight updates before!
>
> TIA,
>
> Colin
>
>
> On Error Resume Next
>
> Dim cn
> Dim sql
> Dim arSQL()
>
> Redim arSQL(3)
>
> arSQL(0) = "begin"
> arSQL(1) = " db2acs_inbound_api.LOAD_MANUAL_INVOICES;"
> arSQL(2) = " commit;"
> arSQL(3) = "end;"
>
> Server.ScriptTimeout 600
>
> Set cn = Server.CreateObject("ADODB.Connection")
> cn.open Session("PROVIDER")
> cn.execute Join(arSQL,"")



Relevant Pages

  • Re: Password Expire
    ... We have one fron end Edge server in our DMZ which passes email onto two ... I used to schedule a script to run every 24 hours on my Exchange 2003 ... Dim fso, txtarray, BodyText ... Call ProcessFolder (objContainer, numDays) ...
    (microsoft.public.exchange.admin)
  • Re: check disk space and email if above xx%?
    ... ' DriveSpace to HTM and email results VBS script ... 'This script will pull a listing of servers from (in this example, ... 'Additionally, in the summary and warning htm, each server has been ... Dim strComputer, Silent, strGBFree, strDiskFreeSpace, strDrvString ...
    (microsoft.public.scripting.vbscript)
  • Re: VBscript in 2008 Server Task Scheduler will not run
    ... That means that yes, pointing directly to the script should work ok; it will probably default to the 64-bit version of the host IIRC, but that should be ok. ... In 2003 server and 2008 32 bit you can just point the task scheduler command ... > Dim mToday ... > For each inputData in input ...
    (microsoft.public.scripting.vbscript)
  • Using VBScript to accept POST data
    ... I would like to have the web server either host a VBS file, ... Dim objShell, objScriptExec, a, strIpConfig, myvar ... first script into this script as an agrument, ... Dim strDirectory, strFile, strText ...
    (microsoft.public.scripting.vbscript)
  • Re: forcing a new browser window
    ... You can only open a new browser window through client end script, server ...
    (microsoft.public.dotnet.framework.aspnet)