At 01:49 PM 10/17/01 -0400, Jeff Johnson wrote:
>Could webkit monitor the number of live servlet threads and if they die,
>create new threads?  Is there a way to stop threads that are taking too
>long?  Is there a way already to find out how many threads are healthy?

Most of these ideas could be implemented, but they aren't there 
currently.  The one thing I don't see how we could do would be to stop 
threads that are taking too long.  I think there's no way to kill a running 
thread in Python, at least not portably.  (And even if you could do so, it 
would leave the whole process in an unstable state.  The docs on the Win32 
functions for killing threads warn you to do it only as a last resort as it 
makes the whole process unstable; I assume similar warnings apply for Unix.)

The best we could do is monitor the health of threads, and if threads are 
dying or getting stuck in infinite loops, we could do an "emergency 
shutdown" where we wait some length of time for the currently processing 
threads to exit, but if they don't exit in some time period, then we just 
try to pickle the sessions to disk and exit the process.  Then some 
watchdog process would notice that WebKit had stopped and restart it.

Of course, it's even better to just eliminate all bugs in WebKit and in 
your servlets so that threads never die or get in infinite loops :-)  Are 
you actually noticing that threads are getting wedged?


--

- Geoff Talvola
   [EMAIL PROTECTED]

_______________________________________________
Webware-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/webware-devel

Reply via email to