[Zope] RE: [Zope-CMF] no mem for new parser
Tres Seaver
tseaver@digicool.com
Sat, 28 Apr 2001 15:41:00 -0400 (EDT)
On Sat, 28 Apr 2001, Norman Khine wrote:
> Thanks fo your reply, you say my system is running out of
> memory, do you mean Hard Disk Space, RAM or what? I am with
> iServer, and they have allocated me 400Mb of HDD and I have
> only used about 150Mb -- I'll check though.
The memory problem would be RAM -- I'm guessing that they have
limited your Zope process to fixed ceiling on memory.
>
> I can also confirm that I have not done any changes to the
> code.
>
> I also had this error on my screen
>
> 2001-04-28T15:40:43 ERROR(200) ZServer uncaptured python exception, closin
> g channel <select-trigger (pipe) at 82e956c> (exceptions.MemoryError:
<snip>
> and on the zope I get this
>
> Error Type: MemoryError
> Error Value: Out of memory while compressing data
<snip>
Both of these errors seem to indicate that Python is running
out of memory while trying to load a FSPythonScript from a
skins directory.
> And then the server restarts.
>
> Can you confirm as to what you want me to do on the
> DirectoryView.py file -- where the following lines are, which I
> found on the file,
>
> if self.data is None or changed:
> try:
> self.data, self.objects = self.prepareContents(registry,
> register_subdirs=changed)
> except:
> # DEBUG
> import traceback
> traceback.print_exc()
>
> self.data = {}
> self.objects = ()
> return self.data, self.objects
>
> you want me to change it to:
>
> try:
> self.data = data = self.prepareContents(registry,
> register_subdirs=changed)
> except:
> # DEBUG
> import traceback
> traceback.print_exc()
>
> raise
That is correct. In "normal" circumstances, setting the data to
a newly-allocated empty dictionary on an exception is OK, but not
in an out-of-memory situation.
Come to think of it, this may not help either. Can you find out
from your IPP if they have a limit on the process size, and if
so, how small it is? If you hit this problem on startup, then
you are likely to hit lots of other MemoryErrors during "normal"
operation.
Tres.
--
===============================================================
Tres Seaver tseaver@digicool.com
Digital Creations "Zope Dealers" http://www.zope.org