Fw: [mod_python] execution time limit

Michael Rasmussen mir at miras.org
Tue Jan 9 18:00:28 EST 2007


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1



Begin forwarded message:

Date: Tue, 9 Jan 2007 23:59:25 +0100
From: Michael Rasmussen <mir at miras.org>
To: "Graham Dumpleton" <grahamd at dscpl.com.au>
Subject: Re: [mod_python] execution time limit


- -----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Tue, 9 Jan 2007 17:19:06 -0500
"Graham Dumpleton" <grahamd at dscpl.com.au> wrote:

> 
> You've lost me. What cookbook are you talking about?
> 
Python cookbook: ISBN: 0-596-00167-3

> 
> Can you provide a better description?
> 

Assuming we are called with this URL: http://www.some.domain/my/script
Assuming myscript.py is designated to handle requests for /my/script
Assuming myscript.py has implemented the function run
Assuming timeout is 30 sec.

But what really goes on is that this call are delegated to a controller
script which directs the call to a script on the server. E.g the server
has a controller which is delegated any request despite of the URL. It
splits the request up in main parts an then calls myscript.py. This call
is carrying out by starting myscript.py in a new thread in either of
two ways:

1:
    t1 = myscript.MyScript()
    t1.start()
    t1.join(30.0)
    return http code 500 to caller

2:
  (Assumption myscript.MyScript has implemented self destruction as the
example from the python cookbook)
    t1 = myscript.MyScript()
    t1.start()
    t1.join()
    return http code 500 to caller

The must elegant solution would be 2. IMHO.

So you see, it is not the apache child process I am killing but a
thread running inside that apache process. The apache process stays
alive and is unknowing of what actually goes on. I think this is
thread safe, at least when discussing the actual apache child
processes.
   
- - -- 
Hilsen/Regards
Michael Rasmussen

Get my public GnuPG keys:
michael <at> rasmussen <dot> cc
http://keyserver.veridis.com:11371/pks/lookup?op=get&search=0xD3C9A00E
mir <at> datanom <dot> net
http://keyserver.veridis.com:11371/pks/lookup?op=get&search=0xE501F51C
mir <at> miras <dot> org
http://keyserver.veridis.com:11371/pks/lookup?op=get&search=0xE3E80917
- - --------------------------------------------------------------
[After hitting Jenny's boyfriend] 

Forrest Gump: "Sorry I had a fight in the middle of your
Black Panther party" 
- -----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFFpB5NVErYVePoCRcRAkjfAJ0TFNgz8WgaHzD5PPesygV/vUf/XACePdg9
iH2nSCgduM5KPRQZzfES1Wo=
=S4xC
- -----END PGP SIGNATURE-----


- -- 
Hilsen/Regards
Michael Rasmussen

Get my public GnuPG keys:
michael <at> rasmussen <dot> cc
http://keyserver.veridis.com:11371/pks/lookup?op=get&search=0xD3C9A00E
mir <at> datanom <dot> net
http://keyserver.veridis.com:11371/pks/lookup?op=get&search=0xE501F51C
mir <at> miras <dot> org
http://keyserver.veridis.com:11371/pks/lookup?op=get&search=0xE3E80917
- --------------------------------------------------------------
Q:	Why was Stonehenge abandoned?
A:	It wasn't IBM compatible.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFFpB6MVErYVePoCRcRAhWEAJ9AoWvl2zG6kfSO3+z3DLMi6RVYpwCfceXR
uB/KtBCqaWLhNDDZt0QxDiE=
=Qh1e
-----END PGP SIGNATURE-----



More information about the Mod_python mailing list