You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by Alex Chaffee <gu...@edamame.stinky.com> on 2000/07/13 19:57:38 UTC

Lifecycle problem starting under heavy load

I just tracked down a very irritating bug.  I have no idea what's
causing it; the tracking down was just identifying the situation that
causes it.

If you start up Tomcat standalone on a site that's *already* receiving
a high volume of requests for a servlet, then that servlet may somehow
get a null ServletConfig object, causing log() to fail.  

I suppose this means that the part of the container responsible for
creating the servlet gets confused if a request comes in at just the
wrong time during the initialization process.  Possibly either
skipping the call to servlet.init(ServletConfig), or calling it with a
null parameter, possibly a second time.

I had to turn off my DSL before starting Tomcat.  Once it's started, I
can turn the hose back on.

Dunno if I'll have time to track this down further.  It should be easy
to reproduce -- run a script that spews connection requests, *then*
launch Tomcat.  If the servlet calls log(), your servlet.log file will
soon fill with stack traces.

 - A

-- 
Alex Chaffee                       mailto:alex@jguru.com
jGuru - Java News and FAQs         http://www.jguru.com/alex/
Creator of Gamelan                 http://www.gamelan.com/
Founder of Purple Technology       http://www.purpletech.com/
Curator of Stinky Art Collective   http://www.stinky.com/

Re: Lifecycle problem starting under heavy load

Posted by Alex Chaffee <gu...@edamame.stinky.com>.
> why not just use System.err.println instead of log() ? Its faster than
> log() anyway....just an aside if youre writing high traffic load balanced
> servlets.

log("foo") is a method in the Servlet API spec and invoking it
shouldn't crash the servlet.

Also, we're working to make tomcat logging more efficient.  It's
already much more functional than System.err (separate log files,
timestamping, etc).


-- 
Alex Chaffee                       mailto:alex@jguru.com
jGuru - Java News and FAQs         http://www.jguru.com/alex/
Creator of Gamelan                 http://www.gamelan.com/
Founder of Purple Technology       http://www.purpletech.com/
Curator of Stinky Art Collective   http://www.stinky.com/

Re: Lifecycle problem starting under heavy load

Posted by yh...@mimic.onesourcecorp.com.

On Thu, 13 Jul 2000, Alex Chaffee wrote:

> Sorry -- 
> 
> java version "1.2.2"
> Classic VM (build Linux_JDK_1.2.2_RC4, native threads, sunwjit)
> Latest CVS sync, I'm pretty sure no local modifications
> 
> 
> On Thu, Jul 13, 2000 at 10:57:38AM -0700, Alex Chaffee wrote:
> > I just tracked down a very irritating bug.  I have no idea what's
> > causing it; the tracking down was just identifying the situation that
> > causes it.
<<SNIP>>> 
> 

why not just use System.err.println instead of log() ? Its faster than
log() anyway....just an aside if youre writing high traffic load balanced
servlets.
-Ys-
yhs@mimic.onesourcecorp.com


Re: Lifecycle problem starting under heavy load

Posted by Alex Chaffee <gu...@edamame.stinky.com>.
Sorry -- 

java version "1.2.2"
Classic VM (build Linux_JDK_1.2.2_RC4, native threads, sunwjit)
Latest CVS sync, I'm pretty sure no local modifications


On Thu, Jul 13, 2000 at 10:57:38AM -0700, Alex Chaffee wrote:
> I just tracked down a very irritating bug.  I have no idea what's
> causing it; the tracking down was just identifying the situation that
> causes it.
> 
> If you start up Tomcat standalone on a site that's *already* receiving
> a high volume of requests for a servlet, then that servlet may somehow
> get a null ServletConfig object, causing log() to fail.  
> 
> I suppose this means that the part of the container responsible for
> creating the servlet gets confused if a request comes in at just the
> wrong time during the initialization process.  Possibly either
> skipping the call to servlet.init(ServletConfig), or calling it with a
> null parameter, possibly a second time.
> 
> I had to turn off my DSL before starting Tomcat.  Once it's started, I
> can turn the hose back on.
> 
> Dunno if I'll have time to track this down further.  It should be easy
> to reproduce -- run a script that spews connection requests, *then*
> launch Tomcat.  If the servlet calls log(), your servlet.log file will
> soon fill with stack traces.
> 
>  - A
> 
> -- 
> Alex Chaffee                       mailto:alex@jguru.com
> jGuru - Java News and FAQs         http://www.jguru.com/alex/
> Creator of Gamelan                 http://www.gamelan.com/
> Founder of Purple Technology       http://www.purpletech.com/
> Curator of Stinky Art Collective   http://www.stinky.com/
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org

-- 
Alex Chaffee                       mailto:alex@jguru.com
jGuru - Java News and FAQs         http://www.jguru.com/alex/
Creator of Gamelan                 http://www.gamelan.com/
Founder of Purple Technology       http://www.purpletech.com/
Curator of Stinky Art Collective   http://www.stinky.com/