> Most of these ideas could be implemented, but they aren't there=20
> currently. The one thing I don't see how we could do would=20
> be to stop=20
> threads that are taking too long. I think there's no way to=20
> kill a running=20
> thread in Python, at least not portably. (And even if you=20
> could do so, it=20
> would leave the whole process in an unstable state. The docs=20
> on the Win32=20
> functions for killing threads warn you to do it only as a=20
> last resort as it=20
> makes the whole process unstable; I assume similar warnings=20
> apply for Unix.)
I was afraid of that. I'm coming from Cold Fusion where you could
specify how long a page could take to respond. Not a big deal, was just
wondering.
> The best we could do is monitor the health of threads, and if=20
> threads are=20
> dying or getting stuck in infinite loops, we could do an "emergency=20
> shutdown" where we wait some length of time for the currently=20
> processing=20
> threads to exit, but if they don't exit in some time period,=20
> then we just=20
> try to pickle the sessions to disk and exit the process. Then some=20
> watchdog process would notice that WebKit had stopped and restart it.
>=20
> Of course, it's even better to just eliminate all bugs in=20
> WebKit and in=20
> your servlets so that threads never die or get in infinite=20
> loops :-) Are=20
> you actually noticing that threads are getting wedged?
The cookie problem was killing off my threads but thats fixed now. I
don't know what other things could cause threads to die, maybe syntax
errors? Now that I have a live server, I get nervous and wonder if the
threads are all healthy but I can't think of a way to check them. Maybe
the admin area could have a thread status page.
Jeff
|