Hanging Python Threads
I have a problem where I periodically get a python thread that never dies by itself, or dies only after 8+ hours. I have tried to mitigate the problem by limiting memory and CPU usage of any individual python thread on my Linux box; it works to a point. A very small point ;) It does prevent these hangs from completely stopping site use, but it also prevents the site running as fast as it could at other times. I am pretty sure that one of two products is the culprit here: ZMySQLDA-2.0.8 (latest stable release) ExtFile-1.1.3 (ExtFile 1.2.0 has since been released with some issues reported on this list) The server experiencing the problem is running Redhat Linux 7.2, Zope 2.5.1, and Python 2.1.3. I have some very large files which are stored as ExtFile objects that my users download via HTTP access at the moment (some 100+ MB). Also, 90% of my website content is dynamically derived from the MySQL database. There are roughly 1000 users that use the site consistently throughout each day. I had found a post (or an archive on the zope.org site) a few weeks ago about a way to debug python threads or to watch a live traceback of threads through some debugging method in order to debug products, but I can't find it again now. I am probably using the wrong search terms this time around. Anyhow, hoping someone knows a way to trace the problem back to the product responsible for the thread hangs (assuming it isn't a problem with either the version of Zope or the version of Python that I am using). Thanks for any help, Ryan
Ryan T. Bard wrote at 2004-1-28 11:31 -0500:
I have a problem where I periodically get a python thread that never dies by itself,
I see this occasionally. Usually, the process is waiting for some network response (which does not come).
... I had found a post (or an archive on the zope.org site) a few weeks ago about a way to debug python threads or to watch a live traceback of threads through some debugging method in order to debug products, but I can't find it again now.
Hopefully, you work under Linux/Unix? Then, they is a HowTo about how to analyse a "spinning Zope". It contains (I think) advice how to use the GDB (GNU debugger) to analyse a Zope process that got out of bounds. -- Dieter
That rings a bell. Time to hunt it down... Thanks a lot! -- Ryan T. Bard Webmaster/Software Developer Department of Medical Education University of Miami School of Medicine Office: (305) 243-3273 Beeper: (305) 277-2482 The information contained in this transmission may contain privileged and confidential information, including patient information protected by federal and state privacy laws. It is intended only for the use of the person(s) named above. If you are not the intended recipient, you are hereby notified that any review, dissemination, distribution or duplication of this communication is strictly prohibited. If you are not the intended recipient, please contact the sender by reply email and destroy all copies of the original message. Dieter Maurer said:
Ryan T. Bard wrote at 2004-1-28 11:31 -0500:
I have a problem where I periodically get a python thread that never dies by itself,
I see this occasionally. Usually, the process is waiting for some network response (which does not come).
... I had found a post (or an archive on the zope.org site) a few weeks ago about a way to debug python threads or to watch a live traceback of threads through some debugging method in order to debug products, but I can't find it again now.
Hopefully, you work under Linux/Unix?
Then, they is a HowTo about how to analyse a "spinning Zope". It contains (I think) advice how to use the GDB (GNU debugger) to analyse a Zope process that got out of bounds.
-- Dieter
participants (2)
-
Dieter Maurer -
Ryan T. Bard