[mod_python] Multiple interpreter instances?

Stefan Hudac stevohudac at yahoo.com
Thu Jul 15 20:54:53 EDT 2004


Hi Volodya

You are right but just partially. Apache 2.xx really introduced threaded 
model, but just as an addition to its forked model. In real life Apache 
still creates couple of forks which then run couple of threads. So to 
get to my original question, memory is shared among mod_python instances 
on one fork, but not in between forks. :-( Still doesn't solve my problem.

Thank you all guys to confirm what I suspected.

stefan

Volodya wrote:

> On Thu, Jul 15, 2004 at 01:19:27PM -0500, Johnathan Gurley wrote:
> 
>>Correct me if I'm wrong, but fork copies the parent process's memory
>>into the child process's memory, but the child has its own unique
>>stack and heap.  This would make it very difficult to share Python
>>memory between Apache instances, as the Apache instances themselves
>>have separate memory space.
> 
> 
> Apache 2 introduced threaded model. Threads share process's memory.
> With Mod_python 3.x and Apache 2.x you can share  global variables per
> Apache's virtual server for example. And it seems threads work fine on
> Linux, Windows and FreeBSD 5.x (but not FreeBSD 4.x).
> 
> _______________________________________________
> 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