tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jan Vávra <>
Subject Re: Tomcat recycling
Date Wed, 23 Nov 2011 07:41:37 GMT
  thanks for a long response.
As I see everybody are againts my proposal. Ok.

Yes, some kind of restarting can be done via some scripts. In the best 
in a cluster environment...
Personally I don't trust /etc/init.d/tomcat scripts that comes in wg. 
SLES linux.
Sometimes this script didn't properly restart tomcat.
It could be due to a some untermintated thread, who knows...

I must look more closely into doc - how tomcat is starting and 
shutdowning if I'd like to do some tomcat recycling by own or modified 


> Hash: SHA1
> Jan,
>> At the end I'd like to make a little comparision. Recently I've
>> used .NET + native calls of dlls, php + custom made php modules
>> (native dlls), jsp+java. .NET and php have possibilities for some
>> kind of recoveries. It's almost impossible to crash Apache like a
>> whole (control + x worker processes).
> ??
> If your PHP script is bad, you'll crash the request processor. If you
> are in prefork mode, a new child process is created when the old child
> dies unexpectedly. If you are in worker mode, well, you're not because
> mod_php doesn't work in worker more IIRC. But, if you were in worker
> mode, then you'd bring-down a bunch of PHP scripts all running in
> parallel and a whole lot of users would see errors. That's not
> terribly user-friendly.
>> So .NET and php seems me they're more stable than tomcat because
>> they have some possibilites.
> So, PHP and .NET are more stable because poorly-written applications
> can be mitigated by using server software that tolerates them? That
> doesn't make any sense at all.
> If you want to say that you'd rather work in .NET or PHP because app
> servers are more forgiving, then that's your decision. But don't try
> to assert that .NET or PHP is somehow better because of that decision.
> It may be better in your situation, but that certainly does not make
> them "more stable". I would argue the reverse: if your webapps crash
> and cause problems, the webapps are not stable. The platform is almost
> irrelevant.
>> I haven't studied recovery options in other java app. servers, but
>> I'd really appreciate something in Tomcat.
> If you can figure out how to determine whether Tomcat is "down", then
> you can easily script a restart. This kind of thing really can't be
> done by Tomcat itself because something outside the JVM needs to
> orchestrate the server restart. Since there are so many environments
> out there, the Tomcat team can't be expected to create auto-restart
> scripts for all those possibilities.
> I'd be interested to see how .NET does this, since .NET runs in a VM
> just like Java, and would have the same potential difficulties.
> IIRC, .NET doesn't have a rich server-side specification like the Java
> Servlet Spec that ties everything together for webapps. Basically,
> it's got IIS's ASP.NET-runner and those ASPs can call-out into "real"
> (that is, something NOT written in ASP but in a real language like C#
> or whatever) components. Given that thin veneer that Microsoft
> provides to its developers, it's not surprising that the server can so
> easily be bounced: there is no complicated infrastructure in place
> that needs to be torn-down and re-started.
> A servlet container is much more complicated and has many more moving
> parts than both IIS's .NET webapp stuff and mod_php. It's not
> surprising to me in the least that you would have a tougher time
> bouncing the service at regular intervals.
> If you really want to bounce Tomcat at regular intervals, set up a
> cluster and have cron (or task scheduler, etc) bounce Tomcat whenever
> you want. Bouncing Tomcat is a non-trivial operation, so it won't be
> instantaneous. I would never do rolling restarts of any service
> without having a cluster in place that could redirect traffic to an
> available server. I would even use mod_jk or something similar to take
> individual members out of the cluster and then wait until their
> traffic dies down before bouncing them. That way, nobody knows that
> your services are undergoing rolling restarts.
> - -chris
> Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
> Comment: GPGTools -
> Comment: Using GnuPG with Mozilla -
> iEYEARECAAYFAk7Lt1gACgkQ9CaO5/Lv0PA9WQCfXA3h21pZlxuOQDxCppmi2ZxT
> P+gAnj0wksaWYvmgR3lCL0Z9fdvYkyWb
> =H67P
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message