[mod_python] Problem with multiple runs of single script

Koumes21 koumes21 at gmail.com
Thu Jan 8 16:28:18 EST 2009


Hello,

I am using Apache 2.2.11, mod_python 3.3.1 and Python 2.5.4, which are,
as far as I know, the latest versions. Everything is configured, to
publish pages I use mod_python.publisher. There is only one thing that
does not work - if there is some page, which takes up longer time to
load, and I want to view it twice at the same time, the first page has
to be sent to client before the execution of the second one will start.
This is quite problematic if I have to make page from which users will
download files (these will besent throught the Python script) - in this
case it is possible to download only one file in one moment. It is quite
strange that it isn't problem of unavailable resources or something like
that - if I open the second page in another browser, they could both
download simultaneously. I tried on Windows (Vista) and on Linux (Ubuntu
8.10) and both computers have the same problem. I was already searching
archive of this mail-list. For example this is quite similiar to my problem:
http://www.modpython.org/pipermail/mod_python/2008-September/025634.html

However, there are few differences:
	I use standard mod_python.publisher handler
	I do NOT use Sessions (module isn't even imported and the pysid
		cookie won't appear in my browser)
	I don't use prefork
	Solution in that thread didn't work for me

I hope someone will be able to help me.
Here is included the shortest code which causes this problem

def index(req):
    import time
    req.content_type="text/plain"
    req.write("working...")
    time.sleep(10) # simulate some function that takes
                   # long time to complete
    req.write("\ndone")

Thank you in advance for every answer that would help me.

Koumes21

P.S. English is not my native language, so it isn't perfect.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 250 bytes
Desc: OpenPGP digital signature
Url : http://mm_cfg_has_not_been_edited_to_set_host_domains/pipermail/mod_python/attachments/20090108/81cf33ae/signature.bin


More information about the Mod_python mailing list