Re: Inactive instance but no deaths and no logs

Ondra Cada <[email protected]>
Newsgroups gmane.comp.web.webobjects.admin
Message-ID <[email protected]>
On Wednesday, Jan 28, 2004, at 14:00 Europe/Prague, Simon wrote:

> i'm a little puzzled as to how to debug this one, but what's more 
> annoying is that it is virtually impossible to pick up the error as 
> there is no indication in the logs that something is wrong, and 
> because the instance doesn't die monitor doesn't send me an email! we 
> only noticed it because a user reported the site being slow, which was 
> actually due to them being allocated the unresponsive instance upon 
> their first request and the adaptor waiting 30 seconds before shifting 
> them to another instance.

I've bumped into this one, too.

After a number of different approaches at the moment we use an external 
watchdog script which tries to get the page using curl. If it succeeds 
(and the page is the real Main), all right. Otherwise, oops -- the 
script kills the instance. (Should you decide to use the same approach, 
let me know if you find a way to get the PID in Java. Myself, I just 
call a plain C tool which returns the result of getppid. Oh, just gimme 
the ole good reliable and flexible ObjC any time!!!!)

So far I've done this for single-instance setup only. I guess it would 
work just as well for multi-instance ones, but there would be an added 
complexity of checking/killing the appropriate instance, which may 
possibly lead to some ugly surprises.
---
Ondra Čada
OCSoftware:     [email protected]               http://www.ocs.cz
private         [email protected]             http://www.ocs.cz/oc
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.