[Zope] Re: Zope hangs and Python eats all memory

Suresh V suresh_vv at yahoo.com
Wed Jan 17 14:11:43 EST 2007


Nico Grubert wrote:
> Dear list members,
> 
> I am running Zope 2.9.6. on a 64-Bit Suse Linux 10.1 machine (9 Gbyte of 
> RAM) with Python 2.4.3. installed.
>  From time to time, Zope hangs and I cannot access it anymore. I tried 
> to use the "Zope DeadlockDebugger" but if my Zope hangs I cannot call 
> the URL "http://myzopesite:8080/manage_debug_threads?secret_password" to 
> let Zope DeadlockDebugger show any useful information. Zope does not 
> response.
> If Zope hangs, the python process eats all the memory and the machine 
> starts to swap.
> 
> The "top" command in the shell tells me: 
> -------------------------------------------------------------------------
> Tasks:  91 total,   2 running,  89 sleeping,   0 stopped,   0 zombie
> Cpu(s): 10.4%us,  0.4%sy,  0.0%ni, 89.0%id,  0.2%wa,  0.0%hi,  0.0%si
> Mem:   9041256k total,  9025124k used,    16132k free,    10604k buffers
> Swap:  4208988k total,  4208988k used,        0k free,     9472k cached
> 
>   PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
> 29992 wwwrun    16   0 12.0g 8.3g 2860 S   19 95.9   3:52.66 python
> -------------------------------------------------------------------------
> 
> There are several add-ons for Zope installed, like:
>  - "Psycopg" Postgres Database Adapter
>  - "mxODBCDA" ODBC Database Adapter
>  - LDAPUserfolder
>  - "Silva" Content Management System
>  - PIL
> 
> Furthermore, I see a lot of Conflict Errors in the "event.log" like e.g.:
> -------------------------------------------------------------------------
> ZPublisher.Conflict ConflictError at 
> /VirtualHostBase/http/193.134.202.20:80/mysite/VirtualHostRoot/: 
> database conflict error (oid 0x0435, class BTrees._OOBTree.OOBTree, 
> serial this txn started with 0x036aeb14ab1c4b88 2007-01-15 
> 12:04:40.104030, serial currently committed 0x036aeb1d0cc5d099 
> 2007-01-15 12:13:02.993605) (80 conflicts (0 unresolved) since startup 
> at Mon Jan 15 11:44:55 2007)
> -------------------------------------------------------------------------
> 
> These kind of Conflict errors occur almost every minute.
> It might be that these errors have something to do with it but I am not 
> sure.
> 
> How can I figure out what exactly causes Zope to hang?
> If you need more information, please let me know.

Have you tried to enable the trace logger in the zope.conf file?
Look for the stanza beginning with <logger trace>.

You need to have your server in debug-mode. This will produce a
trace.log file that can be analyzed with requestprofiler.py.

This will give you the offending requests that caused Zope to hang.

Suresh




More information about the Zope mailing list