There have been a few people recently who have had to restart their
appserver because it stopped responding to requests.  I have a theory and a
possible way to track it down.

My theory is that servlets are hanging for some reason -- perhaps due to a
bug in Webware, but more likely due to a coding bug or a bug in a 3rd-party
module.  If you are running 10 threads in your appserver, you can have 9
servlets hang and it'll still respond to requests on the 10th thread.  But
once the 10th thread hangs, the appserver is stuck.  Perhaps this is what's
happening.

One way to track this down is to add code that logs when a thread begins
processing a request, and when a thread finishes processing a request.
Then, you can scan the log to find out which URL's are causing servlets to
hang -- they start to process a request but never finish.

This call can be used to get the name of the current thread:
threading.currentThread().getName()

So you could add logging to the servlet's awake() and sleep() methods that
would log a sequence number, a timestamp, the URL being accessed, and the
thread name.  If the log contains an awake() message but no corresponding
sleep() message, you know that that request locked up the servlet.

I've also thought of more elaborate schemes where the appserver itself would
keep track of which servlets are taking a long time and spit out a warning
when it looks like a servlet might be wedged, perhaps even sending an email
to the site administrator.  I might implement something like this in the
future.

-- 

- Geoff Talvola
  [EMAIL PROTECTED]

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

Reply via email to