-----------------------------
Please read the FAQ!
<http://java.apache.org/faq/>
-----------------------------

On Mon, 13 Sep 1999, Priatel, Mark (ott) wrote:

> It seems that if I leave JServ alone for a couple hours (overnight) and then
> try in the morning to access one of my servlets, it just hangs.   In fact,
> every servlet hangs...The only thing I can to do fix this, is to restart
> Apache...

Anything in the logs?

> (Actually, while writing this I just restarted apache to fix the problem,
> and it told me httpd wasn't running...hmmm)

We've had this problem with servlets hanging a few times and it was always a
bug in our own servlets/classes that caused it. It usually had to do with bug's
in the code dealing with the pool of DB connections. Are your servlets
connecting to a DB by any chance?

Of course when we couldn't find the bug in a few hours we always started to 
blame either jserv or the jvm (the same as yours), and one time we got so 
desperate that we started to look at jrun and other jvms since we were
sure this was the only way out. But of course, it turned out to be a bug
in a class that forgot to close DB-connections in some obscure cases.

Now we are extremely happy with apache jserv. It runs for days without any
crash or memory leak what so ever. We only restart it when we are
updating the servlets. And we're a quite busy site (The Norwegian Yellow
Pages) serving almost 200 _servlets_ each minute at peak times. This on a
single processor P-II 333, 384MB of memory, RH 5.2. The load never reaches 1,
even at peak times.

> Anyhow, am I missing some simple configuration option?  Is there some way to
> have a cron job that checks periodically for Apache, and restarts it if it's
> down?

That's a simple thing to write, but I think you have a bug in your own servlet/
java code and you should fix that instead of hiding it with constant restarts.
Try keeping an eye on top and see if anything is eating memory. And try logging
as much as possible and see if you can find out anything that way.

-- 
Jorgen Skjaanes
http://www.gulesider.no



--
--------------------------------------------------------------
Please read the FAQ! <http://java.apache.org/faq/>
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Archives and Other:  <http://java.apache.org/main/mail.html>
Problems?:           [EMAIL PROTECTED]

Reply via email to