Kurt Bernhard Pruenner wrote:

> "Craig R. McClanahan" wrote:
> > Jon Skeet wrote:
> > > Unfortunately, this seems to mean that a request for / on the server sends
> > > Tomcat into a tight loop (Java takes up 99% of my CPU).
> >
> > The static interceptor also interprets requests for welcome files (which is
> > what you really want to have happen when you ask for URL "/"), so removing
> > it is probably not a good idea :-).
>
> Errr, Craig... I don't think that using up all CPU time if no interceptor
> wants to be responsible for a URL is any good, either... :)
>
> Shouldn't this behaviour be called a bug as well?
>

For me it only looped for a moment, and then returned a 404 error.  It did not
stay stuck even long enough to peg my CPU meter, which was set on a 5 second
interval, before it finally completed the request and returned.

One other thing that can cause what appear to be CPU lockups is the very first
time you make a request that creates a session.  The random number generator is
initialized, which can take many seconds of 100% CPU usage depending on your
server.

The static interceptor is configured separately so that it can be replaced, not so
that it can be removed (unlike some of the other interceptors which represent
optional functionality).  It is fundamental functionality that you should consider
to be an integral part of Tomcat.

> Kurt Pruenner - Haendelstrasse 17, 4020 Linz, Austria | Briareos at Olymp BBS:

Craig McClanahan


Reply via email to