473,395 Members | 1,474 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,395 software developers and data experts.

Script taking longer than expected to complete: Consequences?

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,"")
Jul 19 '05 #1
2 2961
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" <go****@colinsteadman.com> wrote in message
news:40**************************@posting.google.c om...
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,"")

Jul 19 '05 #2
"Ray Costanzo [MVP]" <my first name at lane 34 dot commercial> wrote in message news:<#l**************@tk2msftngp13.phx.gbl>...
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

Much appreciated.

Thanks Ray.

Colin
Jul 19 '05 #3

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

Similar topics

3
by: vincent wehren | last post by:
Hi, as a small capabilities demo I coded the piece below to show how to use Python for cgi'ing on localhost and it more or less does the trick :-). However, I when I freeze it with py2exe,...
7
by: Lowell Kirsh | last post by:
I have a script which I use to find all duplicates of files within a given directory and all its subdirectories. It seems like it's longer than it needs to be but I can't figure out how to shorten...
7
by: Joker7 | last post by:
Hi, This is still giving me a big problem !! Maybe if I post the original code here it may be of more help as the above will/is not working. $link = "<a
4
by: robert.waters | last post by:
Hello, When the following page is executed in IE6, it generates script errors ('object expected') for any function that is declared in an external ..js file. Why is this???? This code works in...
3
by: Jarod_24 | last post by:
My program (it's a webcrawler) downloads htmlpages and in some cases the html has <script> </script> tags in it that generates parts of the html. How can i interpret this javascript and get the...
1
by: Aaron West | last post by:
Try this script to see what queries are taking over a second. To get some real output, you need a long-running query. Here's one (estimated to take over an hour): PRINT GETDATE() select...
3
by: daniell | last post by:
/* Triangle.cpp */ // Use a pure virtual function. #include <iostream> #include <cstring> using namespace std;
2
by: sensai | last post by:
Hi guys, I'm new to Python and have a ? that some of you can maby help me on. I'm using python 2.4 and running the script from a windows machine getting data from a linux machine. I have a...
6
by: spider661 | last post by:
im trying to make a perl file that will take all the info from a spell_us.txt file and place it into an sql file i can import into my database but its not working can anyone help please? ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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:
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
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.