[Zope] dealing with scripts that take too long

Jonathan dev101 at magma.ca
Wed Jan 25 17:30:46 EST 2006


<snip>
we're experiencing problems with certain maintenance scripts, which
just take too long to complete, so that the browser resets the
connection and Zope aborts the transaction.

Short of splitting the scripts up into smaller pieces and running
them individually (which would be a pain), what can we do?

I was thinking we could send data back to the browser, but I cannot
figure out a way to do this from a TTW Python script. How can I send
data immediately, not only when I 'return printed' after all the
processing is done. NPH or so, I believe this was called with plain
CGIs.

Also, I would be interested in how other people approach this
problem. `zopectl run` may be an alternative, but we'd rather not
require filesystem access.
</snip>

We are running a *nix environment, and use cron with script files that use 
either perl LWP or CURL to make http requests that invoke the zope 
methods/scripts. LWP, CURL (and others) give you the ability to control the 
timeout parameters.

hth

Jonathan



More information about the Zope mailing list