[mod_python] Concurrent requests

Lars Eriksen downgrade at gmx.org
Fri Dec 9 17:08:18 EST 2005


I posted my httpd.conf setup earlier. I am just experimenting, yes. Here is 
the content of the .psp file I use:

<%
import time
time.sleep(10)
req.write('Done.')
%>

As I've mentioned, I access the script concurrently using two browser 
instances.


----- Original Message ----- 
From: "Graham Dumpleton" <grahamd at dscpl.com.au>
To: "Jim Gallacher" <jpg at jgassociates.ca>
Cc: "Lars Eriksen" <downgrade at gmx.org>; <mod_python at modpython.org>
Sent: Friday, December 09, 2005 9:26 PM
Subject: Re: [mod_python] Concurrent requests


> The lock would only be a problem if the sleep() call were being  executed 
> as
> part of a module import.
>
> Can OP post simplified code demonstrating problem?
>
> BTW, why do you want to call sleep(), or is this just experimenting?
>
> Graham
>
> On 10/12/2005, at 4:00 AM, Jim Gallacher wrote:
>
>> I wonder if it's related to the page cache mechanism acquring a  global 
>> lock? Niclolas is more familiar with that code in psp.py and  may be able 
>> to comment.
>>
>> Jim
>>
>> Lars Eriksen wrote:
>>
>>>> Are you using sessions?
>>>>
>>> No.
>>>
>>>> Which mod_python version?
>>>>
>>> Apache/2.0.55 (Win32) mod_python/3.2.5b Python/2.4.2
>>>
>>>> Apache mpm prefork, worker or threaded?
>>>>
>>> Default Apache NT installation, which uses the MPM in threaded mode.
>>> I only added the following to my main directory configuration:
>>> AddHandler mod_python .htm
>>> PythonHandler mod_python.psp
>>> PythonDebug On
>>> Thanks in advance!
>>> ----- Original Message ----- From: "Jim Gallacher" 
>>> <jpg at jgassociates.ca>
>>> To: "Lars Eriksen" <downgrade at gmx.org>
>>> Cc: <mod_python at modpython.org>
>>> Sent: Friday, December 09, 2005 5:03 PM
>>> Subject: Re: [mod_python] Concurrent requests
>>>
>>>> Are you using sessions?
>>>> Which mod_python version?
>>>> Apache mpm prefork, worker or threaded?
>>>>
>>>> Jim
>>>>
>>>>
>>>> Lars Eriksen wrote:
>>>>
>>>>
>>>>> I have created a simple .psp script that simply calls sleep(...)  and 
>>>>> blocks execution for a certain amount of time (x seconds).
>>>>>
>>>>> If I access the .psp script in two instances of my browser at  the 
>>>>> same time, request one waits x seconds, then it finishes,  then 
>>>>> request two is processed and finishes after x * 2 seconds.
>>>>>
>>>>> Requests are obviously queued and not several Python  interpreters 
>>>>> spawned to handle them concurrently.
>>>>>
>>>>> Is there any setting that allows you to specify the number of  Python 
>>>>> interpreters that should be used?
>>>>>
>>>>> Thanks,
>>>>>
>>>>> -Lars
>>>>> _______________________________________________
>>>>> Mod_python mailing list
>>>>> Mod_python at modpython.org
>>>>> http://mailman.modpython.org/mailman/listinfo/mod_python
>>>>>
>>>>>
>>>>
>>>>
>>>>
>>> _______________________________________________
>>> Mod_python mailing list
>>> Mod_python at modpython.org
>>> http://mailman.modpython.org/mailman/listinfo/mod_python
>>>
>>
>> _______________________________________________
>> Mod_python mailing list
>> Mod_python at modpython.org
>> http://mailman.modpython.org/mailman/listinfo/mod_python
>>
>
> 



More information about the Mod_python mailing list