Zope not waiting for long running database stored procedures
Hi, We have Zope 2.7 running a web application which stores its data in an SQL Server 2000 database. As part of this application the user is meant to click on a button on a form which fires off a stored procedure in the database. This stored procedure can be quite long running (up to 5 minutes). The problem is that when the user clicks the button to submit the form Zope doesn't seem to wait around for the stored precedure. The page reloads after about 30 seconds or so and nothing is ever heard from the stored proc. (it doesn't seem to have run). However trying it on smaller data sets has been successful. The stored procedure runs successfuly when invoked manually in the SQL Server Query Analyser no matter how large or small the dataset is. My question is how do I make Zope wait around until the stored proc. has finished executing? (Its acceptable to have the user's browser appear to be loading for the full 5 minutes or so). Any ideas? Thanks Tim Edwards
--On Dienstag, 27. Juli 2004 11:55 Uhr +0800 Tim Edwards <Tim.Edwards@hwe.com.au> wrote:
Hi,
We have Zope 2.7 running a web application which stores its data in an SQL Server 2000 database. As part of this application the user is meant to click on a button on a form which fires off a stored procedure in the database. This stored procedure can be quite long running (up to 5 minutes).
The problem is that when the user clicks the button to submit the form Zope doesn't seem to wait around for the stored precedure. The page reloads after about 30 seconds or so and nothing is ever heard from the stored proc. (it doesn't seem to have run). However trying it on smaller data sets has been successful. The stored procedure runs successfuly when invoked manually in the SQL Server Query Analyser no matter how large or small the dataset is.
My question is how do I make Zope wait around until the stored proc. has finished executing? (Its acceptable to have the user's browser appear to be loading for the full 5 minutes or so). Any ideas?
This does not look like a direct Zope problem. Usually most DAs return from execution if the underlaying RDBMS operation has terminated. Maybe there is some asynchronous processing feature within your used DA? At least on the Zope server side this behaviour is not coming from Zope directly. -aj
Tim Edwards wrote at 2004-7-27 11:55 +0800:
... The problem is that when the user clicks the button to submit the form Zope doesn't seem to wait around for the stored precedure. The page reloads after about 30 seconds or so and nothing is ever heard from the stored proc.
Zope does wait for the storage procedure. As long at it takes... When the page reloads, then this means that your browser became active -- probably due to a "refresh" meta tag. Beside the "refresh", many browsers have nasty (and difficult to configure) timeouts. Of course, they are bad for long running requests... Stock Zope does not provide tools for easy UIs to long running processes. There are some frameworks around, that help with this kind of problems, e.g. "LocalProc" (for long running external processes). Search for them... -- Dieter
participants (3)
-
Andreas Jung -
Dieter Maurer -
Tim Edwards