I currently have a Plone 4.3.8 site where editing a portlet causes a deadlock.
I'm trying to find tools to fix this, but most deadlock tools don't work & I'm not getting good information (IMO) from those that at least run.
I've tried:
- z3c.deadlockdebugger => can't get to a stacktrace
- ZopeHealthWatcher => can't see the results on command line (or webpage)
- Products.LongRequestLogger => perhaps the best so far, gives me some log output - but it's stack traces focus on Diazo code, but the problem still occurs when Diazo isn't in scope (running against 127.0.0.1)
- gdb attach - just landed me in C code
- winpdb => it can't attach to running processes in the same way that gdb can (only to processes started with the intention of attachment by winpdb)
- Products.signalstack (OR Products.signalstacklogger) => USR1 signal just shuts down a zope process!
Note: z3c.deadlockdebugger (and things that depend on it) needs checked out source code to drop the threadframe dependency.
My situation seems to be linked to product upgrades - probably one or both of either plone.app.contenttypes or plone.app.multilingual, an empty site doesn't have this issue, but I obviously I need my site data!
What should I do to progress this?
EDIT:
I believe Maurits answer to be the most correct one, but it didn't work in my case. What I ended up doing was using pdb to track down the point at which the code was hanging (in plone.app.debugtoolbar as it happens)
You say that using the USR1
signal shuts down Zope when using Products.signalstack. But no special packages should be necessary, so I wonder if adding signalstack has this side effect of shutting down Zope.
At least for me, a few weeks ago, this worked fine on a Plone 4.3.something site:
kill -USR1 $(cat var/zeoclient.pid)
Although the @maurits answer is right (and the simplest ones) sometimes I had issues seeing the traceback resulting from the kill
command: sometimes is found on the event log, sometimes on the shell.
I prefer the integration of the buildout with haufe.requestmonitoring, configuring also the monitor long running requests feature. You will see the deadlocked traceback in your event log and also you activate a tool for monitoring low performance on your Plone.
来源:https://stackoverflow.com/questions/36629957/whats-the-modern-way-to-solve-plone-deadlock-issues