[Zope] Running ZopeHTTPServer and PCGI together = a bad thing ?

Michel Pelletier michel@digicool.com
Wed, 2 Jun 1999 12:43:53 -0400


> -----Original Message-----
> From: Tony McDonald [mailto:tony.mcdonald@ncl.ac.uk]
> Sent: Wednesday, June 02, 1999 4:38 AM
> To: Zope List
> Subject: [Zope] Running ZopeHTTPServer and PCGI together = a 
> bad thing?
> 
> 
> Hi,
> I'm running a ZopeServer on port 9673 of a machine and have set up a 
> virtual host using the Apache redirect rules to start up the PCGI 
> process when someone enters the site via the virtual host route.
> 

Hmm.. your not running these servers at the same time are you?  That's
bad.  Only one process can open a database at any one time.  Zope will
*usually* catch this, unless one of those processes opens the database
over a network file system with brain dead locking (in other words,
NFS).  If you have two processes working with a db and one is using NFS,
your database will be silently corrupted.

> My problem is that the information shown to the user is *different*, 
> depending on what route they choose.
> 
> If I look at the database information for the PCGI Zope I get
> Database Size :: 11.3M
> Database Location :: 
> /home/nnle/zope/Zope-1.10.2-solaris-2.5.1-sparc/var/Data.bbb
> You are running Zope version: Zope 1.10.2 (binary release, python 
> 1.5.1, solaris-2.5.1-sparc), on Python 1.5.1 (#1, Feb 16 1999, 
> 18:37:21) [GCC 2.7.2] on sunos5. Zope has been running (with a 
> process ID of 24082) for 19 days 15 hours 49 min16 sec.
> (on this server I can only 'undo' two or three transactions)
> 
> The same data for the port :9673 Zope is
> Database Size :: 11.3M
> Database Location  :: 
> /home/nnle/zope/Zope-1.10.2-solaris-2.5.1-sparc/var/Data.bbb
> You are running Zope version: Zope 1.10.2 (binary release, python 
> 1.5.1, solaris-2.5.1-sparc), on Python 1.5.1 (#1, Feb 16 1999, 
> 18:37:21) [GCC 2.7.2] on sunos5. Zope has been running (with a 
> process ID of 3895) for 22 days 43 min 40 sec.
> (on this server I can 'undo' literally hundreds of transactions).
> 

Ouch!  Looks like you have two processes running.  Bad!  Bad!

> In addition, the Zope server is much faster than the PCGI.
> 

Yes there is some rather expensive forking overhead that must be done to
get from Apache to the Zope long running process.  This is startup
overhead only, once the connection gets to Zope the 'time to complete'
will be identical.

> I have been working on the 9673 server for a long time, and usually 
> start up the PCGI to demo the site without using port numbers. 
> Eventually however, I must get rid of port numbers and (presumably) 
> use the PCGI method.
> 
> I'm really concerned that there is the discrepancy in the server and 
> would like to get it sorted out.
> 
> Does anyone have *any* clues as to what is happening?
> 

See the part above about 'Bad!'. ;)

-Michel


> cheers
> tone.
> ------
> Dr Tony McDonald,  FMCC, Networked Learning Environments Project
> The Medical School, Newcastle University Tel: +44 191 222 5888
> Fingerprint: 3450 876D FA41 B926 D3DD  F8C3 F2D0 C3B9 8B38 18A2
> 
> _______________________________________________
> Zope maillist  -  Zope@zope.org
> http://www.zope.org/mailman/listinfo/zope
> 
> (For developer-specific issues, use the companion list,
> zope-dev@zope.org - http://www.zope.org/mailman/listinfo/zope-dev )
>