debugging wedged zopes
Hi guys, You guys remember that Zope of mine that used to segfault? well, it obviously isn't segfaulting anymore, but now it's behaving in a weird manner. I'm positive it has nothing to do with the segfaults it used to have (don't worry, Matt, I won't drag you to IRC once again :-), but to the complex Zope application it is running (it's full of ZClasses and PythonsScripts and stuff). sometimes it's sitting there nicely by itself at 196MB of RSS memory, suddenly it starts eating memory like a pig and responding VERY slowly. When that happens, usually one of Zope threads is pegged at ninety-something %CPU. Is there a way to know what a Zope thread is doing at a certain point in time, or at least what request it is trying to serve? If I where to roll my own, where would I get the data to do a data structure to keep track of what request the threads are servicing? Cheers, Leo -- Ideas don't stay in some minds very long because they don't like solitary confinement.
Leonardo, The place to start with this is to use the requestprofiler.py script (in the utilities directory) against a "big M" log (-M switch to Z2.py), and look for requests that take a long time or don't end. If you spot a pattern to these requests, you can investigate from there... Leonardo Rochael Almeida wrote:
Hi guys,
You guys remember that Zope of mine that used to segfault? well, it obviously isn't segfaulting anymore, but now it's behaving in a weird manner. I'm positive it has nothing to do with the segfaults it used to have (don't worry, Matt, I won't drag you to IRC once again :-), but to the complex Zope application it is running (it's full of ZClasses and PythonsScripts and stuff).
sometimes it's sitting there nicely by itself at 196MB of RSS memory, suddenly it starts eating memory like a pig and responding VERY slowly.
When that happens, usually one of Zope threads is pegged at ninety-something %CPU.
Is there a way to know what a Zope thread is doing at a certain point in time, or at least what request it is trying to serve?
If I where to roll my own, where would I get the data to do a data structure to keep track of what request the threads are servicing?
Cheers, Leo
-- Chris McDonough Zope Corporation http://www.zope.org http://www.zope.com "Killing hundreds of birds with thousands of stones"
Leonardo Rochael Almeida writes:
.... sometimes it's sitting there nicely by itself at 196MB of RSS memory, suddenly it starts eating memory like a pig and responding VERY slowly. ... Is there a way to know what a Zope thread is doing at a certain point in time, or at least what request it is trying to serve? When you see it happen, you may (still) be able to go to "Control_Panel" -> "Debug Information". At the bottom of this page, you see the current requests.
Dieter
Dieter Maurer wrote:
Leonardo Rochael Almeida writes:
.... sometimes it's sitting there nicely by itself at 196MB of RSS memory, suddenly it starts eating memory like a pig and responding VERY slowly. ... Is there a way to know what a Zope thread is doing at a certain point in time, or at least what request it is trying to serve? When you see it happen, you may (still) be able to go to "Control_Panel" -> "Debug Information". At the bottom of this page, you see the current requests.
I recently had to do this to debug serious problems with SMB authentication using exUserFolder. Under Linux, at least, you can get some serious traction on the problem. See http://www.zope.org/Members/4am/debugspinningzope for details. Cheers, Evan @ 4-am
On Thu, 2002-05-09 at 13:14, Evan Simpson wrote:
http://www.zope.org/Members/4am/debugspinningzope for details.
This is perfect! I'm still waiting for the next time my zope spins o see if I can grab it. -- Ideas don't stay in some minds very long because they don't like solitary confinement.
participants (4)
-
Chris McDonough -
Dieter Maurer -
Evan Simpson -
Leonardo Rochael Almeida