Tarang Patel <[EMAIL PROTECTED]> writes:
> >> To be more clear, I have an automated client program which issues
> >> several POSTs in succession. Usually, the client and Apache+JServ work
> >> fine, but after a few hours of inactivity, the next batch of client
> >> requests will have at least 4 of those requests recieve HTTP 500 errors
> >> from Apache. The rest of the connections after that are fine - almost
> >> like Apache (or JServ) "warmed up".
> >>
> ... snip
>
> So the problem must be with Jserv. Aside this, it appears that
> Jserv freaks out if one packages the the servlets, and has the .jar
> file on the "repository" for the zone. This being a separate
> problem altogether too.
It is possible that it is an Apache JServ problem, but it is far more
likely to be a problem in your code, because AJ is in use in hundreds,
if not thousands, of sites, while your code is used at...your site.
It is quite natural to jump to the conclusion that some underlying
technology is the problem; I have to resist the temptation all the
time.
Case in point (and very relevant to your problem), I just recently
tracked a very similar problem to our code: everything worked fine,
except that over night, when there was no activity, something would
go wrong and the next morning all requests would be met with HTTP 500
errors. The AJP connection between Apache and JServ seemed to have
been lost because Apache was unable to kill and restart JServ, even
though automatic mode was in effect. At first I thought it must be
an AJP problem, that the connection was lost after some period of
inactivity.
The only thing happening during these periods of inactivity was that a
timer thread would periodically fire to check the connections in the
DB connection pool and recycle those that had been inactive for some
time, refreshing the pool with new connections.
It turned out that the problem was that a FileInputStream object was
being created but not closed each time a new connection was
made. During normal activity this was obscured because enough memory
was being used up so that gc() was called before the open file limit
was being reached, and so the FileInputStream's finalize() was called
and the file was closed. When there was no activity, no gc() happened,
the open file limit was reached, and the HTTP 500 errors started.
Maybe you have some similar background task running when the server
is otherwise inactive?
----------------------------------------------------------------
Dennis Doubleday e-mail: [EMAIL PROTECTED]
Fore Systems phone: 724-742-6747
2000 Fore Drive fax: 724-742-7300
Warrendale, PA 15086-7566 Web: http://www.fore.com/
----------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Archives and Other: <http://java.apache.org/main/mail.html/>
Problems?: [EMAIL PROTECTED]