Python and Zope
phd at phd.pp.ru
Mon Sep 10 18:35:37 CEST 2001
On Mon, Sep 10, 2001 at 12:33:48PM -0400, Ignacio Vazquez-Abrams wrote:
> On Mon, 10 Sep 2001, Oleg Broytmann wrote:
> > On Sun, Sep 09, 2001 at 11:07:15AM -0400, Ignacio Vazquez-Abrams 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.
> > >
> > > 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.
> > "At random" meant "out of control of the module". A module cannot
> > predict forking/killing, it cannot even get information about it. It is not
> > the module who controls forking and killing - it is Apache.
> Yes, but there are always enough children to service incoming requests
I talked about persistent DB (SQL) connections, not speed. When Apache
kills a children, what a children (module) shall do with open connection?
Zope (as most web-application servers) opens connections at need, but
closes it only on timeout. Real persistence of connections.
Oleg Broytmann http://phd.pp.ru/ phd at phd.pp.ru
Programmers don't die, they just GOSUB without RETURN.
More information about the Python-list