Python and Zope
Ignacio Vazquez-Abrams
ignacio at openservices.net
Sun Sep 9 11:07:15 EDT 2001
On Sun, 9 Sep 2001, Oleg Broytmann wrote:
> Apache modules are just CGIs. Apache forks off a child at random, and at
> random kills children. On the other hand, web-application server is always
> in memory. This allows for the server to create persistence connection to a
> DB. How can you implement persistence connection in Apache module? Those
> "solutions" that are in mod_perl and mod_python are (in my not so humble
> opinion) just unstable hacks.
Bzzt! Thank you for playing.
I can't talk about mod_python or mod_perl, but mod_php's interpreter is not
CGI; it runs in Apache's memory space. Persistent connections are quite easy
to create (xxx_pconnect() instead of xxx_connect()).
Also, Apache does not fork and kill children at random. A certain minimum
number of children are created at startup, more are created up to a maximum
number if necessary, and once a child has served a certain number of
connections, it is killed. This results in maximum stability because any
memory problems only have a limited amount of time to live.
--
Ignacio Vazquez-Abrams <ignacio at openservices.net>
More information about the Python-list
mailing list