[Zope-dev] Zope hanging on high loads
Chris McDonough
chrism@digicool.com
Thu, 20 Jan 2000 10:03:20 -0500
Frederico,
This is for Zope 2.X... you can turn on debug logging inside z2.py
by inserting the following into the z2.py script somewhere near the end:
from ZServer import DebugLogger
logfile=os.path.join(INSTANCE_HOME,'var/debug.log')
DebugLogger.log=DebugLogger.DebugLogger(logfile).log
Then create the following debug.log analyzer script:
import string, sys
def analyze(f):
requests={}
while 1:
line=f.readline()
line=string.strip(line)
if not line:
break
code, id = string.split(line)[:2]
codes=requests.get(id, [])
codes.append(line)
if len(codes) == 4:
del requests[id]
print '.',
else:
requests[id]=codes
print
for id, l in requests.items():
print 'request', id, 'did not end\n', string.join(l, '\n'), '\n'
if __name__=='__main__':
analyze(open(sys.argv[1]))
ZServer's debug log (debug.log) will start to pile up. When you
come across a few crashes, run the debug log file through the
analyzer script. You will see on which methods the site is
taking a long time. Investigate those methods.
The analyzer script is Amos' (thanks Amos!)
HTH,
Chris
Federico Di Gregorio wrote:
>
> Hi,
>
> we are using Zope to develop some pretty complex web-sites
> (http://www.tradinglab.com) and we are encountering some serious
> problems with high loads. apparently, sometimes, zope does not answer
> to the pcgi-wrapper and after some minutes we have tens (60+) of
> pcgi-wrapper processes hanging with only a few in the "ready" state.
> all the others are sleeping waiting for zope to answer. that happens
> with every version of zope from 1.0.0 up.
>
> if there is some acrtion I can take to send you a more
> informative bug report, please let me know,
>
> thank you very much for your time,
> federico
>
> --
> Federico Di Gregorio
> MIXAD LIVE System Programmer fog@mixadlive.com
> Debian GNU/Linux Developer & Italian Press Contact fog@debian.org
> Best friends are often failed lovers. -- Me
>
> _______________________________________________
> Zope-Dev maillist - Zope-Dev@zope.org
> http://lists.zope.org/mailman/listinfo/zope-dev
> ** No cross posts or HTML encoding! **
> (Related lists -
> http://lists.zope.org/mailman/listinfo/zope-announce
> http://lists.zope.org/mailman/listinfo/zope )
--
Chris McDonough - Digital Creations, Inc.
Publishers of Zope - http://www.zope.org