RE: [Zope] RE: Zope and mod_python
The targeted architecture is : Apache2/mod_python/ZopeHandler <-> ZEO At startup Apache initialize a pool of child processes (the processes that handle requests). Each Apache child process starts a python interpreter (mod_python does it) which in turns initialize an embedded Zope instance. Child processes are reusable, so if you correclty set the pool in Apache, the python processes should live as long as Apache itself. Note that I am not an Apache/mod_python specialist. It's just that when I wanted to try running Zope with mod_python, I found on the web that apparently noone had done it before, and even that in odler versions of mod_python it was clearly stated that it was impossible to achieve. So I just decided to expose what I did to the community, to get feedback. My installation has now been running for 5 days, and I have still no issues, both browsing my site or using the ZMI. Pascal -----Message d'origine----- De : Chris Withers [mailto:chris@simplistix.co.uk] Envoyé : mardi 8 février 2005 11:36 À : Pascal Peregrina Cc : 'zope@zope.org ' Objet : Re: [Zope] RE: Zope and mod_python Pascal Peregrina wrote:
This is because each request is handled in a dedicated Apache process, which is linked to an independent python process.
Hmmm, how and where are connections made to the ZODB? Is there still a long-running process with this method? Chris -- Simplistix - Content Management, Zope & Python Consulting - http://www.simplistix.co.uk ********************************************************************** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. This footnote also confirms that this email message has been swept by MIMEsweeper for the presence of computer viruses. www.mimesweeper.com **********************************************************************
Pascal Peregrina wrote:
The targeted architecture is : Apache2/mod_python/ZopeHandler <-> ZEO
Aha, so you still have a long running python process the form of ZEO?
At startup Apache initialize a pool of child processes (the processes that handle requests). Each Apache child process starts a python interpreter (mod_python does it) which in turns initialize an embedded Zope instance.
Right, and that opens a ClientStorage connection or two through to ZEO?
Child processes are reusable, so if you correclty set the pool in Apache, the python processes should live as long as Apache itself.
Didn't know that, cool :-)
It's just that when I wanted to try running Zope with mod_python, I found on the web that apparently noone had done it before, and even that in odler versions of mod_python it was clearly stated that it was impossible to achieve. So I just decided to expose what I did to the community, to get feedback.
Hehe, well, the community is very greatful :-) Hopefully this can end up as something that ships with Zope by default? Can you submit the work you've done to http://www.zope.org/Collectors/Zope as a feature+patch?
My installation has now been running for 5 days, and I have still no issues, both browsing my site or using the ZMI.
Coool, have you tried load testing it with AB or some such? Chris -- Simplistix - Content Management, Zope & Python Consulting - http://www.simplistix.co.uk
It's just that when I wanted to try running Zope with mod_python, I found on the web that apparently noone had done it before, and even that in odler versions of mod_python it was clearly stated that it was impossible to achieve. So I just decided to expose what I did to the community, to get feedback.
Hehe, well, the community is very greatful :-)
Yes, they are. Well, at least I am. ;-) Very elegant hack. One thing that's missing now that would probably be required is that this setup needs to support filestream iterators (ZPublisher.Iterators). It probably doesn't right now, but should be easy to add. I hope to be able to take a look at that. Maybe we can make a minisprint of it at PyCon. - C
Chris McDonough wrote:
Yes, they are. Well, at least I am. ;-) Very elegant hack.
I just need to waste band width adding a "me too" here :-) This is very interesting news. I need to see if our sites perform faster and safer with this solution. Thanks for your work, Pascal. /dario -- -- ------------------------------------------------------------------- Dario Lopez-Kästen, IT Systems & Services Chalmers University of Tech. "...and click? damn, I need to kill -9 Word again..." - b using macosx
participants (4)
-
Chris McDonough -
Chris Withers -
Dario Lopez-Kästen -
Pascal Peregrina