(This is related to Jeff's question about monitoring thread status...)

I've added some extra paranoia to WebKit's socket reading code in 
ThreadedAppServer.py.  The way it was coded before, WebKit could 
potentially get into an infinite loop if less data was sent over the socket 
from the adapter than it was expecting.  Now, it detects the shortfall of 
data, logs an error and simply discards the malformed request.

I made this change because every once in a while (like every few days) my 
appserver was jumping up to 100% CPU usage with one thread no longer 
responding.  Presumably it was stuck in an infinite loop, and the only 
possible place I could find that could cause an infinite loop was in the 
socket reading code.  My assumption is that occasionally mod_webkit sends 
less data over the socket than it claims to be sending, or perhaps there is 
some glitch in Windows sockets.  In any case, ever since I added the more 
paranoid code, I haven't seen the problem recur (in over a week of usage), 
so I'm pretty confident I mailed the problem.

This would have been much easier to track down if there were some way to 
monitor the threads, perhaps with an Admin servlet like Jeff suggested.


--

- Geoff Talvola
   [EMAIL PROTECTED]

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

Reply via email to