473,806 Members | 2,277 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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.ScriptTi meout 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.ScriptTi meout 600

Set cn = Server.CreateOb ject("ADODB.Con nection")
cn.open Session("PROVID ER")
cn.execute Join(arSQL,"")
Jul 19 '05 #1
2 2977
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****@colinst eadman.com> wrote in message
news:40******** *************** ***@posting.goo gle.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.ScriptTi meout 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.ScriptTi meout 600

Set cn = Server.CreateOb ject("ADODB.Con nection")
cn.open Session("PROVID ER")
cn.execute Join(arSQL,"")

Jul 19 '05 #2
"Ray Costanzo [MVP]" <my first name at lane 34 dot commercial> wrote in message news:<#l******* *******@tk2msft ngp13.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
2412
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, starting the resulting exe fires up the server allright, but fails execute cgi commands correctly (i.e. the expected output - let's say from cgi.test()) - is no longer emitted to the browser...). Is there some py2exe-magic I need to do that I don't...
7
2337
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 it. Perhaps there are some python features or libraries I'm not taking advantage of. The way it works is that it puts references to all the files in a dictionary with file size being the key. The dictionary can hold multiple values per key....
7
1788
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
1958
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 Firefox 1.07 and 1.5. (The following code, when the body's onload event is triggered, simply rewrites the page using documentElement.innerHTML) //------------test.html-------------------- <html> <head>
3
1865
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 resulting html. Im hoping for something very simple: Dim page as string = downloadWebPage(www.page.com\index.htm) 'raw html Dim newPage as string = interpreter.processScripts(page)
1
3485
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 count_big(*) from sys.objects s1, sys.objects s2, sys.objects s3, sys.objects s4, sys.objects s5 PRINT GETDATE()
3
12895
by: daniell | last post by:
/* Triangle.cpp */ // Use a pure virtual function. #include <iostream> #include <cstring> using namespace std;
2
1534
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 script that returns information from the linux box to me ( cpu usage, free memory, ect). What I need help on is taking that information ( output) and put that information into a txt file. Is this a simple task? Any help will be appreciated and thanks for...
6
1505
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? #!/usr/bin/perl -w # # Imports spells from spell_us.txt to spell table, as described in the config below $spellfile="spells_us.txt"; $sqlspellfile="allspells.sql"; $tbspells = "spells";
0
9719
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9597
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
10371
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10110
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9187
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6877
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
4329
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3850
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3008
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.