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

Tony McDonald tony.mcdonald@ncl.ac.uk
Thu, 3 Jun 1999 09:05:07 +0100


Many thanks for the response Michel, I thought I was losing it for a time...

>
>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.

oh......sh*t
I have been running the two processes simultaneously, and I've just 
checked with our sysadmin...we *do* use NFS.
To check on the database I did;

91 % python bbb.py -s 10 -b Data.bbb

Corrupted data record at 9211505

(cOFS.Fold

Corrupted data record at 11844613

(cOFS.DTML

  My Data.bbb is 11847812 bytes, so I guess that means I'm stuffed?
Is there *any* way of getting the data out of the Database and into a 
'clean' one?

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

I know, I know....now :(

> > 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.

Is this a fork for *every* request, eg every link I select. In that 
case, isn't it pretty expensive overall?

> > Does anyone have *any* clues as to what is happening?
>>
>
>See the part above about 'Bad!'. ;)
>
>-Michel

I've used bbb.py from the Zope 2 distribution to create XML 
transactions for 0.. 9211505 and 11844613... 11847812 (but that still 
leaves 9211505..11844613 in limbo)

unnh... so what are my options now?

1) Chop the database at location 11844613 (but then what about the 
junk at 9211505)
2) export as much as possible to .bbe files and reimport into a clean 
database?
3) use the bbb.py from the Zope 2 distribution to get transactions in 
XML (but then how do I recreate the database - bbb.py doesn't mention 
creation of a database)?
4) give up? ... nope, that's not an option. Zope is just so damn useful.

I hate to say this, but HELP!
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