Re: [Zope] custom_zodb.py

2006-09-06 Thread Paul Winkler
On Thu, Sep 07, 2006 at 09:24:34AM +0800, Sinang, Danny wrote:
>  
> Per http://www.plope.com/Books/2_7Edition/MaintainingZope.stx#2-27 , it
> still says write your own custom_zodb.py .
> 
> Can you point me to the exact location ?

Argh, I believe this means the book is still out of date on that point.

I've never needed to tweak the number of connections, but AFAICT
googling for "pool-size"  and either "zodb" or "zope.conf" may be
helpful.

-PW

-- 

Paul Winkler
http://www.slinkp.com
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


RE: [Zope] custom_zodb.py

2006-09-06 Thread Sinang, Danny
 
Per http://www.plope.com/Books/2_7Edition/MaintainingZope.stx#2-27 , it
still says write your own custom_zodb.py .

Can you point me to the exact location ?

Regards,
Danny

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of
Paul Winkler
Sent: Thursday, September 07, 2006 9:16 AM
To: zope@zope.org
Subject: Re: [Zope] custom_zodb.py

Unless you are using Zope 2.6, don't do that.

For Zope 2.7 or later, see the 2.7 version of the book at plope.com.
Some chapters were never updated from the 2.6 version but even so it's
much improved.

For zope 2.7 or later, what you want to do is now done by editing
zope.conf.

On Thu, Sep 07, 2006 at 08:44:08AM +0800, Sinang, Danny wrote:
> In the Zope Book v2.6, it says :
>  
> "Each database connection maintains its own cache (see above, 
> "Database Cache"), so bumping the number of connections up increases 
> memory requirements. Only change this setting if you're sure you have 
> the memory to spare.
> 
> To change this setting, create a file called "custom_zodb.py" in your 
> Zope installation directory. In this file, put the following code:"
> 
> Am not sure which directory "Zope installation directory" pertains to.
> 
> Is this the fresh directory from the Zope .tar.gz file ?
> 
> Or is this the already-installed directory ? Or would it be the 
> instance directory ? If so, which subdirectory do I place
custom_zodb.py ?
> 
> Regards,
> Danny
> 

> ___
> Zope maillist  -  Zope@zope.org
> http://mail.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists -
>  http://mail.zope.org/mailman/listinfo/zope-announce
>  http://mail.zope.org/mailman/listinfo/zope-dev )


-- 

Paul Winkler
http://www.slinkp.com
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists -
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] custom_zodb.py

2006-09-06 Thread Paul Winkler
Unless you are using Zope 2.6, don't do that.

For Zope 2.7 or later, see the 2.7 version of the book
at plope.com.  Some chapters were never updated from the 2.6 version
but even so it's much improved.

For zope 2.7 or later, what you want to do is now done by editing zope.conf.

On Thu, Sep 07, 2006 at 08:44:08AM +0800, Sinang, Danny wrote:
> In the Zope Book v2.6, it says :
>  
> "Each database connection maintains its own cache (see above, "Database
> Cache"), so bumping the number of connections up increases memory
> requirements. Only change this setting if you're sure you have the
> memory to spare.
> 
> To change this setting, create a file called "custom_zodb.py" in your
> Zope installation directory. In this file, put the following code:"
> 
> Am not sure which directory "Zope installation directory" pertains to.
> 
> Is this the fresh directory from the Zope .tar.gz file ?
> 
> Or is this the already-installed directory ? Or would it be the instance
> directory ? If so, which subdirectory do I place custom_zodb.py ? 
> 
> Regards,
> Danny
> 

> ___
> Zope maillist  -  Zope@zope.org
> http://mail.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists - 
>  http://mail.zope.org/mailman/listinfo/zope-announce
>  http://mail.zope.org/mailman/listinfo/zope-dev )


-- 

Paul Winkler
http://www.slinkp.com
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] custom_zodb.py

2006-09-06 Thread Sinang, Danny



In the Zope Book 
v2.6, it says :
 
"Each database connection maintains its own cache (see above, "Database 
Cache"), so bumping the number of 
connections up increases memory requirements. Only change this setting if 
you're sure you have the memory to spare.

To change this setting, create a 
file called "custom_zodb.py" in your Zope installation directory. In this file, 
put the following code:"
Am 
not sure which directory "Zope installation directory" pertains 
to.
Is 
this the fresh directory from the Zope .tar.gz file 
?
Or is 
this the already-installed directory ? Or would it be the instance 
directory ? If so, which subdirectory do I place 
custom_zodb.py ? 
Regards,Danny
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] custom_zodb.py and Control_Panel

2005-05-13 Thread Dieter Maurer
Chris Withers wrote at 2005-5-12 20:45 +0100:
>Jens Vagelpohl wrote:
>> I suppose it could be argued that custom_zodb.py should simply not be 
>> read in any longer, or throw big fat warnings.

[DM]
I agree with you, Jens.

[CW]
>Why wouldn't it still work fine, apart from some minor Control Panel 
>barfage?

[DM]
because it is *very* confusing to see a specific configuration
in the configuration file which is not used (because
it is by magic overridden through "custom_zodb")
and see information in "Control_Panel" --> "Database management"
--> "main" which has nothing to do with what is really in effect.


-- 
Dieter
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] custom_zodb.py and Control_Panel

2005-05-12 Thread Jens Vagelpohl
On May 12, 2005, at 21:45, Chris Withers wrote:
Jens Vagelpohl wrote:
I suppose it could be argued that custom_zodb.py should simply not  
be read in any longer, or throw big fat warnings.

Why wouldn't it still work fine, apart from some minor Control  
Panel barfage?
You will agree that it is confusing at best to even allow a  
completely different and totally unmaintained way of configuring  
these things. zope.conf is the way it should be done, and people who  
don't do it yet should be reminded to change their config.

jens
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] custom_zodb.py and Control_Panel

2005-05-12 Thread Chris Withers
Jens Vagelpohl wrote:
I suppose it could be argued that custom_zodb.py should simply not be 
read in any longer, or throw big fat warnings.
Why wouldn't it still work fine, apart from some minor Control Panel 
barfage?

Chris
--
Simplistix - Content Management, Zope & Python Consulting
   - http://www.simplistix.co.uk
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] custom_zodb.py and Control_Panel

2005-05-02 Thread Jens Vagelpohl
On May 2, 2005, at 14:49, Jim Abramson wrote:
v2.7.4 running on Linux - I'm trying to use this (custom_zodb.py in
INSTANCE_HOME)
custom_zodb.py is no longer used for Zope 2.7.x. You define
databases in zope.conf.
Ah, OK thanks.
Is it for the collector that, aside from messing up the ZMI a bit, the
custom_zodb.py approach is still basically effective?
I suppose it could be argued that custom_zodb.py should simply not be 
read in any longer, or throw big fat warnings.

jens
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope-dev )


RE: [Zope] custom_zodb.py and Control_Panel

2005-05-02 Thread Jim Abramson
> > v2.7.4 running on Linux - I'm trying to use this (custom_zodb.py in
> > INSTANCE_HOME)
> 
> custom_zodb.py is no longer used for Zope 2.7.x. You define 
> databases in zope.conf.
> 
Ah, OK thanks.

Is it for the collector that, aside from messing up the ZMI a bit, the
custom_zodb.py approach is still basically effective?

Jim

___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists -
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] custom_zodb.py and Control_Panel

2005-04-30 Thread Jens Vagelpohl
On Apr 29, 2005, at 20:32, Jim Abramson wrote:
v2.7.4 running on Linux - I'm trying to use this (custom_zodb.py in 
INSTANCE_HOME)
custom_zodb.py is no longer used for Zope 2.7.x. You define databases 
in zope.conf.

jens
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] custom_zodb.py and Control_Panel

2005-04-29 Thread Jim Abramson
Title: custom_zodb.py and Control_Panel






v2.7.4 running on Linux - I'm trying to use this (custom_zodb.py in INSTANCE_HOME)


-

import os

import ZODB.FileStorage

import ZODB.DB


filename = os.path.join(INSTANCE_HOME, 'var', 'Data.fs')

Storage = ZODB.FileStorage.FileStorage(filename)

DB = ZODB.DB(Storage, pool_size=10)

---


When I do it, zope does start up and run, but I get IOError every time I try to look at the "main" storage in Control_Panel->Database: 

Traceback (most recent call last):

  File "", line 1, in ?

  File "/home/zope/Zope-2.7.4-0/lib/python/Zope/__init__.py", line 51, in app

    startup()

  File "/home/zope/Zope-2.7.4-0/lib/python/Zope/__init__.py", line 47, in startu

p

    _startup()

  File "/home/zope/Zope-2.7.4-0/lib/python/Zope/App/startup.py", line 57, in sta

rtup

    DB = configuration.dbtab.getDatabase('/', is_root=1)

  File "/home/zope/Zope-2.7.4-0/lib/python/DBTab/DBTab.py", line 96, in getDatab

ase

    db = self._createDatabase(name, is_root)

  File "/home/zope/Zope-2.7.4-0/lib/python/DBTab/DBTab.py", line 113, in _create

Database

    db = factory.open()

  File "/home/zope/Zope-2.7.4-0/lib/python/Zope/Startup/datatypes.py", line 172,

 in open

    DB = self.createDB()

  File "/home/zope/Zope-2.7.4-0/lib/python/Zope/Startup/datatypes.py", line 169,

 in createDB

    return ZODBDatabase.open(self)

  File "/home/zope/Zope-2.7.4-0/lib/python/ZODB/config.py", line 97, in open

    return ZODB.DB(section.storage.open(),

  File "/home/zope/Zope-2.7.4-0/lib/python/ZODB/config.py", line 128, in open

    quota=self.config.quota)

  File "/home/zope/Zope-2.7.4-0/lib/python/ZODB/FileStorage.py", line 232, in __

init__

    self._lock_file = LockFile(file_name + '.lock')

  File "/home/zope/Zope-2.7.4-0/lib/python/ZODB/lock_file.py", line 62, in __ini

t__

    lock_file(self._fp)

  File "/home/zope/Zope-2.7.4-0/lib/python/ZODB/lock_file.py", line 42, in lock_

file

    fcntl.flock(file.fileno(), _flags)

IOError: [Errno 11] Resource temporarily unavailable



If I remove the custom_zodb.py file, the problem goes away.  Why is the file locked to the ZMI when I use custom_zodb.py?







___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )