Return-Path: X-Original-To: apmail-tomcat-users-archive@www.apache.org Delivered-To: apmail-tomcat-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 02C0F7D6A for ; Wed, 23 Nov 2011 07:42:14 +0000 (UTC) Received: (qmail 16139 invoked by uid 500); 23 Nov 2011 07:42:11 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 15487 invoked by uid 500); 23 Nov 2011 07:42:10 -0000 Mailing-List: contact users-help@tomcat.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Tomcat Users List" Delivered-To: mailing list users@tomcat.apache.org Received: (qmail 15474 invoked by uid 99); 23 Nov 2011 07:42:08 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 23 Nov 2011 07:42:08 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of vavra@602.cz designates 74.125.82.43 as permitted sender) Received: from [74.125.82.43] (HELO mail-ww0-f43.google.com) (74.125.82.43) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 23 Nov 2011 07:42:03 +0000 Received: by wwo1 with SMTP id 1so1471079wwo.0 for ; Tue, 22 Nov 2011 23:41:41 -0800 (PST) Received: by 10.216.137.229 with SMTP id y79mr3262878wei.104.1322034101256; Tue, 22 Nov 2011 23:41:41 -0800 (PST) Received: from [192.168.1.211] (94.112.242.230.static.b2b.upcbusiness.cz. [94.112.242.230]) by mx.google.com with ESMTPS id bl10sm7816007wib.15.2011.11.22.23.41.40 (version=SSLv3 cipher=OTHER); Tue, 22 Nov 2011 23:41:40 -0800 (PST) Message-ID: <4ECCA3B1.8040501@602.cz> Date: Wed, 23 Nov 2011 08:41:37 +0100 From: =?UTF-8?B?SmFuIFbDoXZyYQ==?= User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:5.0) Gecko/20110624 Thunderbird/5.0 MIME-Version: 1.0 To: Tomcat Users List Subject: Re: Tomcat recycling References: <4EC67B49.10503@602.cz> <6239524569447954652@unknownmsgid> <4ECA50FA.9020303@602.cz> <4ECBB758.6070908@christopherschultz.net> In-Reply-To: <4ECBB758.6070908@christopherschultz.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Hello, 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 scripts. Thanks. Jan. > -----BEGIN PGP SIGNED MESSAGE----- > 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 > -----BEGIN PGP SIGNATURE----- > Version: GnuPG/MacGPG2 v2.0.17 (Darwin) > Comment: GPGTools - http://gpgtools.org > Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ > > iEYEARECAAYFAk7Lt1gACgkQ9CaO5/Lv0PA9WQCfXA3h21pZlxuOQDxCppmi2ZxT > P+gAnj0wksaWYvmgR3lCL0Z9fdvYkyWb > =H67P > -----END PGP SIGNATURE----- > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org > For additional commands, e-mail: users-help@tomcat.apache.org > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org For additional commands, e-mail: users-help@tomcat.apache.org