Why not parse the python code fragments before executing them and insert a check for a stop event in the beginning of each loop. It could even force a loop counter of some type that would allow the main thread to force the worker thread to stop processing through a stop event once a threshold has been reached.
-----Original Message----- > [Webware-discuss] Dead threads: detection and recovery Oliver Bock > Mon, 19 Jun 2006 00:50:23 -0700 > > My system allows users to write their own python code fragments for > some tasks. Unfortunately the users sometimes write infinite loops, > which gradually lock up threads until none remain. A few minutes > later a monitor notices that the system is unresponsive and kills and > restarts AppServer. There must be a better way. > > 1. Can I find out how long each busy thread has been working on its > current request? > 2. Can I kill threads without irritating w4py? > > I guess I can roll my own solution for detecting busy threads, but I'm > hoping someone else has a solution for this, or that I've failed to > notice something obvious that already exists. > > > Oliver _______________________________________________ Webware-discuss mailing list Webware-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/webware-discuss All the advantages of Linux Managed Hosting--Without the Cost and Risk! Fully trained technicians. The highest number of Red Hat certifications in the hosting industry. Fanatical Support. Click to learn more http://sel.as-us.falkag.net/sel?cmd=lnk&kid=107521&bid=248729&dat=121642 _______________________________________________ Webware-discuss mailing list Webware-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/webware-discuss