Re: [Zope] [ZODB-Dev] Zope memory usage

2008-09-17 Thread Manuel Vazquez Acosta
Alan,

I'm replying to the Zope list also, because this issue is perhaps
related to other components there.

I'm running into the same situation: The python process running my Plone
site is steadyly growing.

I'm using Zope2.9.8-final (the one which works with Plone 2.5.5).

What is the plan for Zope include such feature?

Best regards,
Manuel.

Alan Runyan wrote:
> There was a recent modification to limit the ZODB cache to a set size.  i.e.
> Limit the size of memory usage to 128MB.
> 
> The original feature was implemented here:
>   http://svn.zope.org/ZODB/branches/dm-memory_size_limited-cache/
> 
> You can get the feature+3.8 branch of the ZODB from:
>   http://svn.zope.org/ZODB/branches/zcZODB-3.8/
> 
> The changes are also on trunk (will be ZODB 3.9).
> 
> The goal of the modification is to try to put upper bounds on the size of
> the database cache.  Before this "size limited cache" the cache would grow
> and if you had very large objects in the zodb cache -- your memory usage would
> be surpringsly high.
> 
> Please use this feature in your testing at upfront.  And let Roche know this
> feature has landed (if we was not monitoring svn checkins).  The feature needs
> to be test driven.  Give it a go and report your experience.
> 
> cheers
> alan
> 
> 
> On Wed, Sep 17, 2008 at 5:10 AM, Izak Burger <[EMAIL PROTECTED]> wrote:
>> Hi all,
>>
>> I'm sure this question has been asked before, but it drives me nuts so I
>> figured I'll ask again. This is a problem that has been bugging me for
>> ages. Why does zope memory use never decrease? Okay, I've seen it
>> decrease maybe by a couple megabyte, but never by much. It seems the
>> general way to run zope is to put in some kind of monitoring, and
>> restart it when memory goes out of bounds. In general it always uses
>> more and more RAM until the host starts paging to disk. This sort of
>> baby-sitting just seems wrong to me.
>>
>> It doesn't seem to make any difference if you set the cache-size to a
>> smaller number of objects or use a different number of threads. Over
>> time things always go from good to bad and then on to worse. I have only
>> two theories: a memory leak, or an issue with garbage collection (python
>> side).
>>
>> It is possible that this is not a bug, my reasoning goes like this: The
>> OS exposes a "virtual memory" picture to the application, ie, the
>> application does not know how much of the RAM is real and how much is
>> paged out. All it does is call malloc every now and then. Combined with
>> a kernel that allows overcommit (which is in general a good thing), I
>> see this going only one way.
>>
>> I'm hoping someone on this list has some insights into the issue.
>>
>> regards,
>> Izak
>> ___
>> For more information about ZODB, see the ZODB Wiki:
>> http://www.zope.org/Wikis/ZODB/
>>
>> ZODB-Dev mailing list  -  [EMAIL PROTECTED]
>> http://mail.zope.org/mailman/listinfo/zodb-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] Multithreading sessions

2008-05-23 Thread Manuel Vazquez Acosta
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

This is relevant:
http://docs.python.org/api/threads.html
http://www.pyzine.com/Issue001/Section_Articles/article_ThreadingGlobalInterpreter.html

But notice some C extensions do allow concurrency by releasing the GIL.
Most I/O operations in the standard library do that. And probably the
network library used by python to connect to MySQL does that too.

However, if I got everything Jon explained, the problems happens even
with several DB servers. :?

Best regards,
Manuel.

Sours, Kevin wrote:
> What it sounds like is that Python is using a "sequential" threading
> model.  I don't know about Python in particular, but some languages
> implement a sequential model internally so that multithreaded programs
> will run correctly (if not effeciently) in the absense of whatever
> thread libraries the language uses for normal threading.
> 
> As an aside, something I learned the hard way is that Python doesn't
> thread very well.  The documentation talks a lot about threading, but in
> most instances only one thread can run at a given time (it should still
> swap between threads, though).  I never saw any benefit to increasing
> z-server-threads beyond 4 -- all the extra threads are going to do is
> consume memory.  If you need get real concurrency (for example to make
> use of additional processors) you need to run multiple zope processes.
> Kevin
> 
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of
> Jon Emmons
> Sent: Friday, May 23, 2008 8:10 AM
> To: 'Jaroslav Lukesh'; zope@zope.org
> Subject: RE: [Zope] Multithreading sessions
> 
> Jaroslav and everyone,
> 
> I have made the changes Jaroslav suggested and I cannot get Zope to
> serve even 2 sessions simultaneously.
> 
> In our testing, one client will start a query to the data servers.
> Another will try to simply get the logon page to be served.  Zope will
> simply sit there and wait until the DB returns its results for the first
> user before doing anything at all for the second.  The 2nd user is not
> hitting the DB server.  The python script accessing the data is waiting
> for the results for the first user.  Could python be the problem?
> 
> I am running python 2.4.4.
> 
> Is it possible that I missed a flag or something when I build the Zope?
> 
> Thanks for your suggestions so far, but I think I have missed a
> fundamental setup step that allows zope to multithread sessions.
> 
> If I were echoing what was being served to the clients, shouldn't I see
> it interwoven?  I don't, it is always (client 1's results) then (client
> 2's results)... very atomic.
> 
> Thanks again,
> 
> Jon Emmons
> 
> 
> 
> -Original Message-
> From: Jaroslav Lukesh [mailto:[EMAIL PROTECTED]
> Sent: Friday, May 23, 2008 9:37 AM
> To: Jon Emmons; zope@zope.org
> Subject: Re: [Zope] Multithreading sessions
> 
> Hi Jon,
> 
> I use 24 zserver-threads and I have here defined number of ZoDB
> connections
> (pool-size):
> 
> in your instance etc/zope.conf look for that section:
> 
> 
> # Main FileStorage database
> 
>   path $INSTANCE/var/Data.fs
> 
> mount-point /
> cache-size 1000
> pool-size 24
> 
> 
> Please pay attention, if you have bunch of cache, your RAM shoul be
> exhausted.
> 
> Regards, JL.
> 
> - Original Message -
> From: "Jon Emmons" <[EMAIL PROTECTED]>
> 
> 
>> I had already gone into zope.conf and added the line:
>>
>> zserver-threads 10
>>
>> This seemed to have no effect.  Is that what you mean?
>> You think I should bump it higher?  100 maybe?
> 
> ___
> 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 )
> 

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFINvPgI2zpkmcEAhgRAgdwAKCAFmjuU93kwK/N9YG1rNFIsWF0vwCffP/D
jii2wbhTczH9PhkD1VvdGYA=
=vovu
-END PGP SIGNATURE-
___
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] Zope threads and the GIL

2008-05-05 Thread Manuel Vazquez Acosta
Dieter Maurer wrote:
> Manuel Vazquez Acosta wrote at 2008-5-4 11:12 -0400:
>> ...
>> That would mean that the only place where real multitasking occurs is
>> when fetching objects from ZEO and other I/O bounded tasks, isn't?
> 
> I depends what you mean with "real multitasking".
> 
> If you mean by this that several CPUs are concurrently active for your
> Zope process, then you are near. 

Exactly. Several CPUs, I would like to use.

> You can, however, also write code
> for expensive time consuming operations in a language different from
> Python and then release the GIL before you active such code. Then,
> this code, too, can occupy a CPU in addition to the Python activity.
> 

I'm very new to Python, and don't grasp yet the C API. Also I would like
to implement almost everything in Python: I need this, b/c my of my
team's skills in C are None.

Best regards,
Manuel.

___
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] Zope threads and the GIL

2008-05-05 Thread Manuel Vazquez Acosta
Andreas Jung wrote:
> 
> 
> --On 5. Mai 2008 10:11:32 -0400 Manuel Vazquez Acosta
> <[EMAIL PROTECTED]> wrote:
> 
>> Andreas Jung wrote:
>>> Then it should play nicely with Python. But keep in mind that thread
>>> switches can also be blocked by some thread without having the GIL
>>> locked. We've seen such situations were a thread had to perform complex
>>> regular expression matching operations. Obviously code in Python C
>>> extension is also able to lock up the Python interpreter until the
>>> result is being passed back to the Python interpreter.
>>>
>>
>> Another Q: Is AccessControl GIL aware? I mean, this is probably the most
>> used component in Zope. Maybe a performance boost is experienced if
>> those checks can be made simultaneously.
> 
> Better tell us what your _real_ question/problem is. I am not getting
> the point what you are really interested in.
> 
> -aj

I'm thinking in CPU-bounded parts of a request: Reindexing, Clustering,
Automatic Content Extraction, and the like...

We have implemented k-means clustering algorithm on top ZCTextIndex (now
plan to port to zc.catalog), although this is batch operation, some
other are per-query: Summarizing is one of those: Per cluster, and per
document. (Although this is maybe a question for the OTS list).

So I'm a little bit worried about how the resource utilization.

Best regards,
Manuel.




___
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] Zope threads and the GIL

2008-05-05 Thread Manuel Vazquez Acosta
Andreas Jung wrote:
> Then it should play nicely with Python. But keep in mind that thread
> switches can also be blocked by some thread without having the GIL locked.
> We've seen such situations were a thread had to perform complex regular
> expression matching operations. Obviously code in Python C extension is
> also able to lock up the Python interpreter until the result is being
> passed back to the Python interpreter.
> 

Another Q: Is AccessControl GIL aware? I mean, this is probably the most
used component in Zope. Maybe a performance boost is experienced if
those checks can be made simultaneously.

Thinking harder, I realize that a tradeoff is in place: Objects can
change its security status (the security policy -- i.e, the security
object -- can be changed also, but is a weird use case, isn't it?). So
maybe write-lock is needed.

On the other hand, for objects with a high demand rate, which are kept
in memory, good results are to be expected.

CacheFu deals OK with Anonymous users, but a boost is to be expected for
authenticated users.

Best regards,
Manuel.
___
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] Zope threads and the GIL

2008-05-04 Thread Manuel Vazquez Acosta
Andreas Jung wrote:
> 
> 
> --On 4. Mai 2008 09:44:17 -0400 Manuel Vazquez Acosta
> <[EMAIL PROTECTED]> wrote:
> 
>> Hi all, How does the GIL affect Zope threads?
> 
> Zope threads are Python threads and therefore a thread switch is not
> possible is some thread is holding the GIL.
> 
> -aj
> 

That would mean that the only place where real multitasking occurs is
when fetching objects from ZEO and other I/O bounded tasks, isn't?

Best regards,
Manuel
___
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] Zope threads and the GIL

2008-05-04 Thread Manuel Vazquez Acosta
Hi all, How does the GIL affect Zope threads?

Best regards,
Manuel.
___
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] How do I migrate CacheFu

2008-04-16 Thread Manuel Vazquez Acosta
Hi all,

I'm moving a Plone site from one server to another. At the same time I
have upgraded Plone 2.5 to 2.5.5.

I have managed to move all contents without major problems.

Now I'm dealing with CacheFu. It refuses to enabled. I digged into the
code and notice this:

265 if installed_version != __version__:
266 # CacheSetup hasn't migrated yet so let's disable it.
267 field = self.getField('enabled')
268 if field is None:
269 self._updateSchema()
270 elif field.get(self) == True:
271 field.set(self, False)
272 if getToolByName(self, config.PAGE_CACHE_MANAGER_ID,
None) is not None:
273  -> enableCacheFu(self, False)
274 
(Pdb) installed_version != __version__
True
(Pdb)


So it seems I have not properly migrated CacheFu. How do I do that?

Best regards,
Manuel.

___
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] Problem with zopectl debug

2008-04-10 Thread Manuel Vazquez Acosta
Dieter Maurer wrote:
> Manuel Vazquez Acosta wrote at 2008-4-7 15:21 -0400:
>> Dieter Maurer wrote:
>>> That is very strange:
>>>
>>>   "zopectl debug" uses almost exactly the same startup sequence
>>>   as "zopectl fg" (at least until after the configuration).
>>>   Thus, if your Zope starts at all, "zopectl debug" should start.
>> ...
>> zopectl fg starts. Would need to see the starting sequence?
> 
> Really funny
> 
> Unfortunately, this means that is will be quite difficult
> to find the cause of your problem.
> 
> One approach would be to emulate in a pure Python interpreter
> what "zopectl debug" would do for us.
> 
> You may try:
> 
> bin/zopectl shell # will create a new shell process with the correct 
> environment
> 
> from Zope2.Startup.run import configure
> configure('etc/zope.conf')
> # this is likely to raise the exception you have earlier reported
> from pdb import pm
> pm() # analyse the exception context
> 
> 
> 

I will try that. Any thing happens I report back to the list.

Best regards,
Manuel.
___
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] Re: Hooking persistent.Persistent.__setstate__ was Re: [ZODB-Dev] Analyzing a ZODB.

2008-04-08 Thread Manuel Vazquez Acosta
Alan Runyan wrote:
> 
>   - Customer has software on a remote machine.  They are seeing
>   unnecessary transaction commits.  Just like the guy 'Analyzing a ZODB'.

I'm that guy ;).

BTW, we have related those unnecessary commits to CMFQuestions, an old
plone product now superseded by PloneSurveys... We came to that not by
inspecting the code, but by realizing there were too many conflicts
related with CMFQuestionnaire. We removed it, and the commits vanished.


Best regards,
Manuel.
___
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] Problem with zopectl debug

2008-04-07 Thread Manuel Vazquez Acosta
Dieter Maurer wrote:
> That is very strange:
> 
>   "zopectl debug" uses almost exactly the same startup sequence
>   as "zopectl fg" (at least until after the configuration).
>   Thus, if your Zope starts at all, "zopectl debug" should start.
> 
> Are you sure that the CMF version fits to your Zope version?
> 

Dear Mr. Maurer,

Thanks for your response. Here are more details.

CMF is the one that came with Plone 2.5 (I'm planning to upgrade to 2.5.5).

Zope is 2.9.8-final.

zopectl fg starts. Would need to see the starting sequence?

Best regards,
Manuel.

___
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] Re: Problem with zopectl debug

2008-04-05 Thread Manuel Vazquez Acosta
Manuel Vazquez Acosta wrote:
> 
> The directory /var/zope/zope-prensa is where the "real" instance use to
> be. However for development and debuging I set up my working instance in
> my home.
> 

I removed the /var/zope/zope-prensa by simply removing compiled python
modules: pyc's.

How I still get this:
  File "", line 1, in ?
  File "/home/manu/bin/opt/Zope-2.9.8f/lib/python/Zope2/Startup/run.py",
line 31, in configure
opts = _setconfig(configfile)
  File "/home/manu/bin/opt/Zope-2.9.8f/lib/python/Zope2/Startup/run.py",
line 46, in _setconfig
opts.realize(doc="Sorry, no option docs yet.", raise_getopt_errs=0)
  File "/home/manu/bin/opt/Zope-2.9.8f/lib/python/zdaemon/zdoptions.py",
line 273, in realize
self.load_schema()
  File "/home/manu/bin/opt/Zope-2.9.8f/lib/python/zdaemon/zdoptions.py",
line 321, in load_schema
self.schema = ZConfig.loadSchema(self.schemafile)
  File "/home/manu/bin/opt/Zope-2.9.8f/lib/python/ZConfig/loader.py",
line 31, in loadSchema
return SchemaLoader().loadURL(url)
  File "/home/manu/bin/opt/Zope-2.9.8f/lib/python/ZConfig/loader.py",
line 65, in loadURL
return self.loadResource(r)
  File "/home/manu/bin/opt/Zope-2.9.8f/lib/python/ZConfig/loader.py",
line 159, in loadResource
schema = ZConfig.schema.parseResource(resource, self)
  File "/home/manu/bin/opt/Zope-2.9.8f/lib/python/ZConfig/schema.py",
line 27, in parseResource
xml.sax.parse(resource.file, parser)
  File "/usr/lib/python2.4/site-packages/_xmlplus/sax/__init__.py", line
31, in parse
parser.parse(filename_or_stream)
  File "/usr/lib/python2.4/site-packages/_xmlplus/sax/expatreader.py",
line 109, in parse
xmlreader.IncrementalParser.parse(self, source)
  File "/usr/lib/python2.4/site-packages/_xmlplus/sax/xmlreader.py",
line 123, in parse
self.feed(buffer)
  File "/usr/lib/python2.4/site-packages/_xmlplus/sax/expatreader.py",
line 216, in feed
self._parser.Parse(data, isFinal)
  File "/usr/lib/python2.4/site-packages/_xmlplus/sax/expatreader.py",
line 312, in start_element
self._cont_handler.startElement(name, AttributesImpl(attrs))
  File "/home/manu/bin/opt/Zope-2.9.8f/lib/python/ZConfig/schema.py",
line 99, in startElement
getattr(self, "start_" + name)(attrs)
  File "/home/manu/bin/opt/Zope-2.9.8f/lib/python/ZConfig/schema.py",
line 475, in start_schema
keytype, valuetype, datatype = self.get_sect_typeinfo(attrs)
  File "/home/manu/bin/opt/Zope-2.9.8f/lib/python/ZConfig/schema.py",
line 201, in get_sect_typeinfo
datatype = self.get_datatype(attrs, "datatype", "null", base)
  File "/home/manu/bin/opt/Zope-2.9.8f/lib/python/ZConfig/schema.py",
line 194, in get_datatype
return self._registry.get(dtname)
  File "/home/manu/bin/opt/Zope-2.9.8f/lib/python/ZConfig/datatypes.py",
line 398, in get
t = self.search(name)
  File "/home/manu/bin/opt/Zope-2.9.8f/lib/python/ZConfig/datatypes.py",
line 423, in search
package = __import__(n, g, g, component)
  File
"/home/manu/bin/opt/Zope-2.9.8f/lib/python/Zope2/Startup/datatypes.py",
line 21, in ?
import OFS.Uninstalled
  File "/home/manu/bin/opt/Zope-2.9.8f/lib/python/OFS/Uninstalled.py",
line 20, in ?
import SimpleItem, Globals, Acquisition
  File "/home/manu/bin/opt/Zope-2.9.8f/lib/python/OFS/SimpleItem.py",
line 26, in ?
import AccessControl.Role, AccessControl.Owned, App.Common
  File
"/home/manu/bin/opt/Zope-2.9.8f/lib/python/AccessControl/Role.py", line
19, in ?
from Globals import DTMLFile, MessageDialog, Dictionary
  File "/home/manu/bin/opt/Zope-2.9.8f/lib/python/Globals/__init__.py",
line 23, in ?
import Acquisition, ComputedAttribute, App.PersistentExtra, os
  File
"/home/manu/bin/opt/Zope-2.9.8f/lib/python/App/PersistentExtra.py", line
24, in ?
from class_init import default__class_init__
  File "/home/manu/bin/opt/Zope-2.9.8f/lib/python/App/class_init.py",
line 16, in ?
import AccessControl.Permission
  File
"/home/manu/bin/opt/Zope-2.9.8f/lib/python/AccessControl/Permission.py",
line 18, in ?
import string, Products, Globals
  File "Products/__init__.py", line 4, in ?
from Products.CMFCore.DirectoryView import registerDirectory
  File "Products/CMFCore/__init__.py", line 20, in ?
import PortalObject, PortalContent, PortalFolder
  File "Products/CMFCore/PortalObject.py", line 18, in ?
from Globals import InitializeClass
ImportError: cannot import name InitializeClass


Best regards,
Manuel.
___
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] Problem with zopectl debug

2008-04-05 Thread Manuel Vazquez Acosta
Hi all,

I'm trying to debug a Plone site with zopectl debug. I'm getting this error:

Traceback (most recent call last):
  File "", line 1, in ?
  File "/home/manu/bin/opt/Zope-2.9.8f/lib/python/Zope2/Startup/run.py",
line 31, in configure
opts = _setconfig(configfile)
  File "/home/manu/bin/opt/Zope-2.9.8f/lib/python/Zope2/Startup/run.py",
line 46, in _setconfig
opts.realize(doc="Sorry, no option docs yet.", raise_getopt_errs=0)
  File "/home/manu/bin/opt/Zope-2.9.8f/lib/python/zdaemon/zdoptions.py",
line 273, in realize
self.load_schema()
  File "/home/manu/bin/opt/Zope-2.9.8f/lib/python/zdaemon/zdoptions.py",
line 321, in load_schema
self.schema = ZConfig.loadSchema(self.schemafile)
  File "/home/manu/bin/opt/Zope-2.9.8f/lib/python/ZConfig/loader.py",
line 31, in loadSchema
return SchemaLoader().loadURL(url)
  File "/home/manu/bin/opt/Zope-2.9.8f/lib/python/ZConfig/loader.py",
line 65, in loadURL
return self.loadResource(r)
  File "/home/manu/bin/opt/Zope-2.9.8f/lib/python/ZConfig/loader.py",
line 159, in loadResource
schema = ZConfig.schema.parseResource(resource, self)
  File "/home/manu/bin/opt/Zope-2.9.8f/lib/python/ZConfig/schema.py",
line 27, in parseResource
xml.sax.parse(resource.file, parser)
  File "/usr/lib/python2.4/site-packages/_xmlplus/sax/__init__.py", line
31, in parse
parser.parse(filename_or_stream)
  File "/usr/lib/python2.4/site-packages/_xmlplus/sax/expatreader.py",
line 109, in parse
xmlreader.IncrementalParser.parse(self, source)
  File "/usr/lib/python2.4/site-packages/_xmlplus/sax/xmlreader.py",
line 123, in parse
self.feed(buffer)
  File "/usr/lib/python2.4/site-packages/_xmlplus/sax/expatreader.py",
line 216, in feed
self._parser.Parse(data, isFinal)
  File "/usr/lib/python2.4/site-packages/_xmlplus/sax/expatreader.py",
line 312, in start_element
self._cont_handler.startElement(name, AttributesImpl(attrs))
  File "/home/manu/bin/opt/Zope-2.9.8f/lib/python/ZConfig/schema.py",
line 99, in startElement
getattr(self, "start_" + name)(attrs)
  File "/home/manu/bin/opt/Zope-2.9.8f/lib/python/ZConfig/schema.py",
line 475, in start_schema
keytype, valuetype, datatype = self.get_sect_typeinfo(attrs)
  File "/home/manu/bin/opt/Zope-2.9.8f/lib/python/ZConfig/schema.py",
line 201, in get_sect_typeinfo
datatype = self.get_datatype(attrs, "datatype", "null", base)
  File "/home/manu/bin/opt/Zope-2.9.8f/lib/python/ZConfig/schema.py",
line 194, in get_datatype
return self._registry.get(dtname)
  File "/home/manu/bin/opt/Zope-2.9.8f/lib/python/ZConfig/datatypes.py",
line 398, in get
t = self.search(name)
  File "/home/manu/bin/opt/Zope-2.9.8f/lib/python/ZConfig/datatypes.py",
line 423, in search
package = __import__(n, g, g, component)
  File
"/home/manu/bin/opt/Zope-2.9.8f/lib/python/Zope2/Startup/datatypes.py",
line 21, in ?
import OFS.Uninstalled
  File "/home/manu/bin/opt/Zope-2.9.8f/lib/python/OFS/Uninstalled.py",
line 20, in ?
import SimpleItem, Globals, Acquisition
  File "/home/manu/bin/opt/Zope-2.9.8f/lib/python/OFS/SimpleItem.py",
line 26, in ?
import AccessControl.Role, AccessControl.Owned, App.Common
  File
"/home/manu/bin/opt/Zope-2.9.8f/lib/python/AccessControl/Role.py", line
19, in ?
from Globals import DTMLFile, MessageDialog, Dictionary
  File "/home/manu/bin/opt/Zope-2.9.8f/lib/python/Globals/__init__.py",
line 23, in ?
import Acquisition, ComputedAttribute, App.PersistentExtra, os
  File
"/home/manu/bin/opt/Zope-2.9.8f/lib/python/App/PersistentExtra.py", line
24, in ?
from class_init import default__class_init__
  File "/home/manu/bin/opt/Zope-2.9.8f/lib/python/App/class_init.py",
line 16, in ?
import AccessControl.Permission
  File
"/home/manu/bin/opt/Zope-2.9.8f/lib/python/AccessControl/Permission.py",
line 18, in ?
import string, Products, Globals
  File "Products/__init__.py", line 4, in ?
from Products.CMFCore.DirectoryView import registerDirectory
  File "/usr/lib/python2.4/site-packages/PIL/__init__.py", line 20, in ?

  File "/var/zope/zope-prensa/Products/CMFCore/PortalObject.py", line
18, in ?
ImportError: cannot import name InitializeClass
>>>


I created my instance by compiling Zope-2.9.8-final and restoring the
Data.fs from a repozo backup.

The directory /var/zope/zope-prensa is where the "real" instance use to
be. However for development and debuging I set up my working instance in
my home.

Any ideas?

Best regards,
Manuel.
___
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] Re: [ZODB-Dev] Analyzing a ZODB.

2008-04-05 Thread Manuel Vazquez Acosta
> In a development environment, set a breakpoint (e.g. add "import pdb;
> pdb.set_trace()" in ZODB.Connection.Connection.register.
> 
> You'll be able to see exactly what is causing object changes.  I
> recommend doing this in the zope debugger, which makes it easy to run
> one request at a time.

Dear Mr. Fulton,

Thanks for your quick response

By the zope debugger you mean this:
http://www.simplistix.co.uk/software/zope/zdb ??

Best regards,
Manuel.
___
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] Analyzing a ZODB.

2008-04-05 Thread Manuel Vazquez Acosta
Hi all,

Recently I was appointed to improve a Plone's performance, and I have
the following issue:

I see too many transactions made by the anonymous user. I can reproduce
this behaviour: just watching the home page produces a transaction at
/index by None.

I wonder if there's a way to actually see what objects (or object types)
are modified by those transactions. So I can go directly to the source
of the (surely innecesary) transaction.

I tried analyze.py but I don't grasp the output accurately.

Best regards,
Manuel.
___
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] ERROR Zope.ZCatalog reindexIndex could not resolve an object from the uid

2008-03-03 Thread Manuel Vazquez Acosta


First, you check whether "path/to/the/object" really is a path
to an existing object. Maybe, the object was deleted and your
object has not correctly synchronized with the catalog on deletion.



Checked. They were gone.



Another potential reason could be:

  For historical reasons, a ZCatalog can use either physical paths
  or request/url based resolution.
  The latter is not safe when used with virtual hosting.
  Should you use the old way, then you might now use a different
  virtual host than when the object was indexed.



I think it using physical paths. In the error there are no traces of 
VHM. Although the site is doing with both Apache and Squid.




When you want to recover from the error (without understanding where
the problem comes from), you could use the "Update catalog" from
the "Advanced" tab. It will uncatalog any object that cannot be resolved.
Alternatively, you can uncatalog the problematic object explicitly.



Well, after writing the post, I cleared every index and rebuild them. I 
didn't know I could Update it.


Clearing + Reindexing worked.

Somehow this "lost" object was affecting Plone's portal_factory: I could 
not create any new document of the folder that should have the lost object.


Thanks,
Manuel.

___
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] ERROR Zope.ZCatalog reindexIndex could not resolve an object from the uid

2008-03-02 Thread Manuel Vazquez Acosta

Hi all,

I'm facing some trouble with a Plone Site. When trying to insert a new 
page I get an error complaining about some lost uid.


I have tryied clearing uid_catalog's indexes: UID, id, and Title. Then I 
reindex those indexes, and in the event.log I got several errors:


ERROR Zope.ZCatalog reindexIndex could not resolve an object from the 
uid '/path/to/the/object'


Does anyone knows how to troubleshoot this?

Thanks in advance,
Manuel.
___
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 )