Mailing List Archive

MemoryError: out of memory
I am receiving this Exception when running Zope with CMF/Plone. Here
are the details of my system:

Dell PE2650
Dual 2.8GHz Xeon
4GB RAM

Zope 2.6.1
Python 2.1.3

Here is the text of the exception:

Traceback (innermost last):
Module ZPublisher.Publish, line 98, in publish
Module ZPublisher.mapply, line 88, in mapply
Module ZPublisher.Publish, line 39, in call_object
Module Shared.DC.Scripts.Bindings, line 252, in __call__
Module Shared.DC.Scripts.Bindings, line 283, in _bindAndExec
Module Products.PageTemplates.ZopePageTemplate, line 228, in _exec
Module Products.PageTemplates.PageTemplate, line 96, in pt_render
- <ZopePageTemplate at /Sherman/browse_links used for
/Sherman/Categories/InternetLinks>
Module StringIO, line 160, in getvalue
MemoryError

At the time of the exception the PythonService.exe was consuming 3984K
of RAM and python.exe was consuming 125960K. I've checked Google and
Zope.org for any related topics and have yet to find anything.

Could someone please point me in the right direction on how correct this
issue?

Thanks,
Andy.

Andrew Rechenberg
Infrastructure Team, Sherman Financial Group

_______________________________________________
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: MemoryError: out of memory [ In reply to ]
Rechenberg, Andrew wrote at 2003-8-26 16:36 -0400:
> I am receiving this Exception when running Zope with CMF/Plone. Here
> are the details of my system:
>
> Dell PE2650
> Dual 2.8GHz Xeon
> 4GB RAM
> ...
> /Sherman/Categories/InternetLinks>
> Module StringIO, line 160, in getvalue
> MemoryError
>
> At the time of the exception the PythonService.exe was consuming 3984K
> of RAM and python.exe was consuming 125960K. I've checked Google and
> Zope.org for any related topics and have yet to find anything.

Thus, Python/Zope is not to blame (it uses about 130 MB of 4 GB).

I see 2 possible cases:

* Another process on your machine eat all available memory
and your Zope process failed to get memory and therefore
raised this exception.

* There are special limits in effect that restrict memory
use for your Zope process to about 126 M.

"ulimit" can be used to set and check such limits.


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: MemoryError: out of memory [ In reply to ]
Dieter Maurer wrote:
> "ulimit" can be used to set and check such limits.

On Windows?

Chris


_______________________________________________
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: MemoryError: out of memory [ In reply to ]
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

You should monitoring memory usage over time. Obviously something
in your application is leaking memory.

- -aj

Jonathan Salazar Santos schrieb:
> Hi Comunity,
>
> I have been in troubles with Zope2.10.5-final since 4 moths ago,
> related to the "MemoryError: out of memory" (in the event.log), every
> three or fourth days (more or less) the Zope starts to say in our web:
> value error: Memory, and stops to serve some pages (not all), usually
> the pages that serve file contents (to download, convert to pdf or
> view online). I solve the problem (when appears) by rebooting the zope
> server, but its not a solutions, because I dont know when the error
> its coming ¿Can you help me to giving me some light to solve the
> problem? I have 2gb of RAM, and the server (FreeBSD) it says
> no-overloaded, just have 2 services, web(zope) and database(mysql). I
> think its something related to the cache memory or kind of (I changed
> some values in config file but not success). See some of my event.log
>
>
> Traceback (innermost last):
> Module ZPublisher.Publish, line 119, in publish
> Module ZPublisher.mapply, line 88, in mapply
> Module ZPublisher.Publish, line 42, in call_object
> Module OFS.DTMLMethod, line 144, in __call__
> - <DTMLMethod at /xxxx/index_html used for /xxxx/suscribete/adminNewsletter>
> - URL: http://xxxx/index_html/manage_main
> - Physical Path: /xxxx/index_html
> Module DocumentTemplate.DT_String, line 476, in __call__
> Module OFS.DTMLMethod, line 137, in __call__
> - <DTMLMethod at /xxxx/suscribete/adminNewsletter/third_header>
> - URL: http://xxxx/suscribete/adminNewsletter/third_header/manage_main
> - Physical Path: /xxxx/suscribete/adminNewsletter/third_header
> Module DocumentTemplate.DT_String, line 476, in __call__
> Module DocumentTemplate.DT_In, line 703, in renderwob
> Module Products.MailHost.SendMailTag, line 114, in render
> Module Products.MIMETools.MIMETag, line 198, in render
> Module MimeWriter, line 177, in lastpart
> MemoryError: out of memory
>
>


- --
ZOPYX Limited | zopyx group
Charlottenstr. 37/1 | The full-service network for Zope & Plone
D-72070 Tübingen | Produce & Publish
www.zopyx.com | www.produce-and-publish.com
- ------------------------------------------------------------------------
E-Publishing, Python, Zope & Plone development, Consulting


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

iQGUBAEBAgAGBQJNQP9kAAoJEADcfz7u4AZjARQLv25A9rr7JyaaBg8SZDl1G1EN
t19RNt1nXOg4tw+6r82IhH8I55FH+RbP+dHI73DuNTVJuSPYg2s9xuRtfOMdyhE1
AqRTew6MK0paLaoRH9QtjWvPnhr4dnKSBn2FK4kRxzc0mKh9tTHefbwN+CUmGQmv
lO+t0ZVdK+SqUwcfG9BekjVr/VYXUukhkm6WzxLTBkOo67sT+fTk2i8fZ7QH3dDw
7q6f+dgOV0E1MWlQ1OeydEm+SAGo7EwqB1iaArCxwpJDN6YPLWQZk3DbA0kM9nNQ
U6YAKsBI5urwuOoLiFJYHSGwy91Wgm9uLkNicx7sQ0zyJnGdReFfMNcf0BQWlz8X
k0FGnaQ1oHo8qXGisgJPn1vZZxFlNtnnH7QLKk53lt4+9B6tBW3WI5RJXO9g+w2s
Us/vpTLEHamyjb9bZNVvFI6qqQ0TiV1CmmsMSiOsEBTD56i7oS6SA594RyM65d0R
BNUWKcU6pN/7W21MxhzGf3kLJirEgw4=
=WPMi
-----END PGP SIGNATURE-----
Re: MemoryError: out of memory [ In reply to ]
This little something form 2008 might work
http://www.peterbe.com/plog/zope-memory-readings


On 27 January 2011 05:15, Andreas Jung <lists@zopyx.com> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> You should monitoring memory usage over time. Obviously something
> in your application is leaking memory.
>
> - -aj
>
> Jonathan Salazar Santos schrieb:
>> Hi Comunity,
>>
>> I have been in troubles with Zope2.10.5-final since 4 moths ago,
>> related to the "MemoryError: out of memory" (in the event.log), every
>> three or fourth days (more or less) the Zope starts to say in our web:
>> value error: Memory, and stops to serve some pages (not all), usually
>> the pages that serve file contents (to download, convert to pdf or
>> view online). I solve the problem (when appears) by rebooting the zope
>> server, but its not a solutions, because I dont know when the error
>> its coming ¿Can you help me to giving me some light to solve the
>> problem? I have 2gb of RAM, and the server (FreeBSD) it says
>> no-overloaded, just have 2 services, web(zope) and database(mysql). I
>> think its something related to the cache memory or kind of (I changed
>> some values in config file but not success). See some of my event.log
>>
>>
>> Traceback (innermost last):
>>   Module ZPublisher.Publish, line 119, in publish
>>   Module ZPublisher.mapply, line 88, in mapply
>>   Module ZPublisher.Publish, line 42, in call_object
>>   Module OFS.DTMLMethod, line 144, in __call__
>>    - <DTMLMethod at /xxxx/index_html used for /xxxx/suscribete/adminNewsletter>
>>    - URL: http://xxxx/index_html/manage_main
>>    - Physical Path: /xxxx/index_html
>>   Module DocumentTemplate.DT_String, line 476, in __call__
>>   Module OFS.DTMLMethod, line 137, in __call__
>>    - <DTMLMethod at /xxxx/suscribete/adminNewsletter/third_header>
>>    - URL: http://xxxx/suscribete/adminNewsletter/third_header/manage_main
>>    - Physical Path: /xxxx/suscribete/adminNewsletter/third_header
>>   Module DocumentTemplate.DT_String, line 476, in __call__
>>   Module DocumentTemplate.DT_In, line 703, in renderwob
>>   Module Products.MailHost.SendMailTag, line 114, in render
>>   Module Products.MIMETools.MIMETag, line 198, in render
>>   Module MimeWriter, line 177, in lastpart
>> MemoryError: out of memory
>>
>>
>
>
> - --
> ZOPYX Limited           | zopyx group
> Charlottenstr. 37/1     | The full-service network for Zope & Plone
> D-72070 Tübingen        | Produce & Publish
> www.zopyx.com           | www.produce-and-publish.com
> - ------------------------------------------------------------------------
> E-Publishing, Python, Zope & Plone development, Consulting
>
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.11 (Darwin)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
>
> iQGUBAEBAgAGBQJNQP9kAAoJEADcfz7u4AZjARQLv25A9rr7JyaaBg8SZDl1G1EN
> t19RNt1nXOg4tw+6r82IhH8I55FH+RbP+dHI73DuNTVJuSPYg2s9xuRtfOMdyhE1
> AqRTew6MK0paLaoRH9QtjWvPnhr4dnKSBn2FK4kRxzc0mKh9tTHefbwN+CUmGQmv
> lO+t0ZVdK+SqUwcfG9BekjVr/VYXUukhkm6WzxLTBkOo67sT+fTk2i8fZ7QH3dDw
> 7q6f+dgOV0E1MWlQ1OeydEm+SAGo7EwqB1iaArCxwpJDN6YPLWQZk3DbA0kM9nNQ
> U6YAKsBI5urwuOoLiFJYHSGwy91Wgm9uLkNicx7sQ0zyJnGdReFfMNcf0BQWlz8X
> k0FGnaQ1oHo8qXGisgJPn1vZZxFlNtnnH7QLKk53lt4+9B6tBW3WI5RJXO9g+w2s
> Us/vpTLEHamyjb9bZNVvFI6qqQ0TiV1CmmsMSiOsEBTD56i7oS6SA594RyM65d0R
> BNUWKcU6pN/7W21MxhzGf3kLJirEgw4=
> =WPMi
> -----END PGP SIGNATURE-----
>
> _______________________________________________
> Zope maillist  -  Zope@zope.org
> https://mail.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists -
>  https://mail.zope.org/mailman/listinfo/zope-announce
>  https://mail.zope.org/mailman/listinfo/zope-dev )
>
>



--
Peter Bengtsson,
work www.fry-it.com
home www.peterbe.com
hobby donecal.com
_______________________________________________
Zope maillist - Zope@zope.org
https://mail.zope.org/mailman/listinfo/zope
** No cross posts or HTML encoding! **
(Related lists -
https://mail.zope.org/mailman/listinfo/zope-announce
https://mail.zope.org/mailman/listinfo/zope-dev )
Re: MemoryError: out of memory [ In reply to ]
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 01/26/2011 03:19 PM, Jonathan Salazar Santos wrote:
> Hi Comunity,
>
> I have been in troubles with Zope2.10.5-final since 4 moths ago,
> related to the "MemoryError: out of memory" (in the event.log), every
> three or fourth days (more or less) the Zope starts to say in our web:
> value error: Memory, and stops to serve some pages (not all), usually
> the pages that serve file contents (to download, convert to pdf or
> view online). I solve the problem (when appears) by rebooting the zope
> server, but its not a solutions, because I dont know when the error
> its coming ¿Can you help me to giving me some light to solve the
> problem? I have 2gb of RAM, and the server (FreeBSD) it says
> no-overloaded, just have 2 services, web(zope) and database(mysql). I
> think its something related to the cache memory or kind of (I changed
> some values in config file but not success). See some of my event.log
>
>
> Traceback (innermost last):
> Module ZPublisher.Publish, line 119, in publish
> Module ZPublisher.mapply, line 88, in mapply
> Module ZPublisher.Publish, line 42, in call_object
> Module OFS.DTMLMethod, line 144, in __call__
> - <DTMLMethod at /xxxx/index_html used for /xxxx/suscribete/adminNewsletter>
> - URL: http://xxxx/index_html/manage_main
> - Physical Path: /xxxx/index_html
> Module DocumentTemplate.DT_String, line 476, in __call__
> Module OFS.DTMLMethod, line 137, in __call__
> - <DTMLMethod at /xxxx/suscribete/adminNewsletter/third_header>
> - URL: http://xxxx/suscribete/adminNewsletter/third_header/manage_main
> - Physical Path: /xxxx/suscribete/adminNewsletter/third_header
> Module DocumentTemplate.DT_String, line 476, in __call__
> Module DocumentTemplate.DT_In, line 703, in renderwob
> Module Products.MailHost.SendMailTag, line 114, in render
> Module Products.MIMETools.MIMETag, line 198, in render
> Module MimeWriter, line 177, in lastpart
> MemoryError: out of memory

The "aliases" feature of the stock Shared.DC.ZRDB.Results.Results class
has a leak, due to an uncollectable cycle created between the alias
objects and the record class generated *for each query*. If your app
makes heavy use of stock ZSQL methods, you are probably going to have to
plan to monitor the server's RAM usage and reboot as it gets close to
the limit.

If you are confident either that your application does not need the
alias feature (your SQL queries all spell the column names using the
"canonical" spelling for your SQL server), or that you can modify them
to do so, you might try applying the attached patch, which removes the
aliase feature.


Tres.
- --
===================================================================
Tres Seaver +1 540-429-0999 tseaver@palladion.com
Palladion Software "Excellence by Design" http://palladion.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk1BmW4ACgkQ+gerLs4ltQ41VgCfeqvB4gRnQAd2xY+EHjkbTwiP
7xcAnA7GGngAry7jqXbCWDBq8ugafIw8
=cPGc
-----END PGP SIGNATURE-----
Re: MemoryError: out of memory [ In reply to ]
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 01/27/2011 11:12 AM, Tres Seaver wrote:

> The "aliases" feature of the stock Shared.DC.ZRDB.Results.Results class
> has a leak, due to an uncollectable cycle created between the alias
> objects and the record class generated *for each query*. If your app
> makes heavy use of stock ZSQL methods, you are probably going to have to
> plan to monitor the server's RAM usage and reboot as it gets close to
> the limit.
>
> If you are confident either that your application does not need the
> alias feature (your SQL queries all spell the column names using the
> "canonical" spelling for your SQL server), or that you can modify them
> to do so, you might try applying the attached patch, which removes the
> aliase feature.

I should note that I never use the stock results class (or SQL methods)
any longer: instead, I use the 'sqladapters' product we wrote when we
first discovered the leak:


http://agendaless.com/Members/tseaver/software/sqladapters/sqladapters-1.0/


Tres.
- --
===================================================================
Tres Seaver +1 540-429-0999 tseaver@palladion.com
Palladion Software "Excellence by Design" http://palladion.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk1BmyoACgkQ+gerLs4ltQ7JpQCgw76+ltS33nnUoDJQepGAWW2c
hkMAoNn0PsLtLY1Fp91NxZjbvnv6kbCW
=DWNc
-----END PGP SIGNATURE-----

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