[Zope] Re: debugging a wayward zope process

Brian Brinegar brinegar at ecn.purdue.edu
Fri Jan 26 14:39:40 EST 2007


http://www.zopelabs.com/cookbook/1073504990

In addition to the information on this page I have found that you can
also run the following command at a (gdb) prompt to get a list of URLs
being processed by the misbehaving thread:

call PyRun_SimpleString("import string,sys,os,ZServer;
sys.stdout=open('/tmp/urls','w',0); print string.join(map(lambda
a:str(getattr(a,'env',{}).get('PATH_INFO','')),
sys.modules['asyncore'].socket_map.values()), '\\n')")

It's doing a bunch of stuff to try to format the file nicely into a file
/tmp/urls, it can probably be simplified.

There may also be an altogether better way of approaching it. Just
thought I'd throw this in. And looking at it, I'm not sure that you need
to import ZServer or os, I came up with this and didn't really refine it
once it worked.

-- 
Brian Brinegar
Web Systems Developer
Engineering Computer Network


More information about the Zope mailing list