Tracy S. Ruggles wrote:
> Hi all,
> 
> Is anyone out there using Monitor.py yet have their server hang in
> responding to GET and POST requests (via mod_webkit), but Monitor.py
> still think the server is okay?
> 
> Monitor.py just happily checks the server (via sending the marshalled
> data through a socket connection) and the AppServer responds with the
> appropriate information, but then any request that comes through
> mod_webkit does nothing. 

This probably means that all of the threads that service requests are wedged
or have crashed somehow, but the dispatching thread is still alive.

> 
> I currently have a separate script that is periodically run to see if
> it can get a web page.  It fires off an urllib.urlopen(URL) command in
> a separate thread and waits 10 seconds to see if it succeeds.  If it
> doesn't it sends off an email to my beeper.
> 
> I'm pretty sure it's hanging of because of a bad database connection,
> but it would be nice to have Monitor.py know about, too.
> 
> Thanks for any info on this...

Monitor.py's approach is flawed, since it can't detect this scenario.  It
would be better if Monitor.py sent a request over the same socket as regular
requests, and if the request were handled in one of the worker threads just
like a regular request.

All of those ideas that were floated around a while ago about monitoring for
wedged or crashed threads would obviously be useful here too.  Since nobody
has done that yet, what I would recommend is putting something like:

        import threading
        print 'beginning new request in thread',
threading.currentThread().getName()
        ...
        print 'done with request in thread',
threading.currentThread().getName()

in ThreadedAppServer.py at the beginning and end of
RequestHandler.handleRequest() which will let you see when threads are
getting wedged by examining the logfile.

- Geoff


-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Webware-discuss mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/webware-discuss

Reply via email to