You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by Alexander Leyke <Al...@cs.com> on 2003/05/06 21:39:44 UTC
TomcatStarter class causes race condition
Hi,
I am having a slight issue with the way TomcatStarter works. Due to
bootstrapping Tomcat in a new thread, it is possible that single-process
Web server (AOLserver in my case, and I suspect IIS as well) becomes
ready to accept connections before Tomcat is completely initialized. In
other words, there is a cold start period when Web server responds with
500 status to any JSP request. This is definitely not desirable on a
server farm with load balancing, where server's readiness to accept
connections automatically places it in rotation.
I propose a new argument, "-wait", that would inform TomcatStarter not
to create new thread for bootstrapping Tomcat. Any objections to me
making the change available with next installment of nsjk2 software?
Thanks - Alex
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org
RE: TomcatStarter class causes race condition
Posted by Mladen Turk <mt...@apache.org>.
> From: AlexLeykek@cs.com
>
> I am having a slight issue with the way TomcatStarter works. Due to
> bootstrapping Tomcat in a new thread, it is possible that
> single-process
> Web server (AOLserver in my case, and I suspect IIS as well) becomes
> ready to accept connections before Tomcat is completely
> initialized. In
> other words, there is a cold start period when Web server
> responds with
> 500 status to any JSP request. This is definitely not desirable on a
> server farm with load balancing, where server's readiness to accept
> connections automatically places it in rotation.
>
> I propose a new argument, "-wait", that would inform
> TomcatStarter not
> to create new thread for bootstrapping Tomcat. Any objections to me
> making the change available with next installment of nsjk2 software?
>
IMO wouldn't help you, cause introducing wait will still give you 500 or
404.
We had that mechanism bundled inside loadbalacer. look at the
http://cvs.apache.org/viewcvs.cgi/jakarta-tomcat-connectors/jk/native2/c
ommon/jk_worker_lb.c
(see rev. 1.28), but I've dropped that, cause it doesn't belogs there.
Also, that doesn't solve the non-jni connection (someday we'll have
service channel that will solve such cases).
The TomcatStarter is going to be dropped, as well as tomcat-jni
altogether.
There will be new classloader overcoming the TomcatStarter limitations.
MT.
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org