Re: Tomcat synchronous shutdown?
"Kevin A. Burton" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Shapira, Yoav wrote: > >>The semantic of "restart only if you feel like it" is useless IMHO. You >>either want a restart or you don't. If there's an error serious enough >>to prevent shutdown, you want to look into it anyways. But since your >>use-case apparently calls for this functionality, go ahead, do it, and >>have fun ;) I'd probably -1 any proposed patches as useless bloat. >> > It isn't like this functionaliy is new. Most major daemons in existance > implement this. Apache, MySQL, Postgres, Sendmail, I could go on. > Use jsvc from commons-daemon. It implements restart semantics (at least if you don't use the one that ships with Tomcat :). > In fact Tomcat is the odd man out on this guy. Every single daemon on my > Unix box implements this version of semantic control except Tomcat. > > The major issue is for scripts. Even most major Linux distribution tools > like the sysv init tools under KDE assume that scripts can do shutdown > correctly or return an error code. > > Kevin > > -- > > Use Rojo (RSS/Atom aggregator). Visit http://rojo.com. Ask me for an > invite! Also see irc.freenode.net #rojo if you want to chat. > > Rojo is Hiring! - http://www.rojonetworks.com/JobsAtRojo.html > > If you're interested in RSS, Weblogs, Social Networking, etc... then you > should work for Rojo! If you recommend someone and we hire them you'll > get a free iPod! >Kevin A. Burton, Location - San Francisco, CA > AIM/YIM - sfburtonator, Web - http://peerfear.org/ > GPG fingerprint: 5FB2 F3E2 760E 70A8 6174 D393 E84D 8D04 99F1 4412 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat synchronous shutdown?
Shapira, Yoav wrote: The semantic of "restart only if you feel like it" is useless IMHO. You either want a restart or you don't. If there's an error serious enough to prevent shutdown, you want to look into it anyways. But since your use-case apparently calls for this functionality, go ahead, do it, and have fun ;) I'd probably -1 any proposed patches as useless bloat. It isn't like this functionaliy is new. Most major daemons in existance implement this. Apache, MySQL, Postgres, Sendmail, I could go on. In fact Tomcat is the odd man out on this guy. Every single daemon on my Unix box implements this version of semantic control except Tomcat. The major issue is for scripts. Even most major Linux distribution tools like the sysv init tools under KDE assume that scripts can do shutdown correctly or return an error code. Kevin -- Use Rojo (RSS/Atom aggregator). Visit http://rojo.com. Ask me for an invite! Also see irc.freenode.net #rojo if you want to chat. Rojo is Hiring! - http://www.rojonetworks.com/JobsAtRojo.html If you're interested in RSS, Weblogs, Social Networking, etc... then you should work for Rojo! If you recommend someone and we hire them you'll get a free iPod! Kevin A. Burton, Location - San Francisco, CA AIM/YIM - sfburtonator, Web - http://peerfear.org/ GPG fingerprint: 5FB2 F3E2 760E 70A8 6174 D393 E84D 8D04 99F1 4412 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat synchronous shutdown?
Hi, >"Too long" can be defined in a configuration file. It could be, and you're welcome to go ahead and do it. Waste of time. >The major problem is that Tomcat can't do a 'restart'. For example with >mysql I can do a /etc/init.d/mysql restart and it will block until stop >runs... then start. If stop returns an errorcode then it won't attempt >to startup MySQL again. The semantic of "restart only if you feel like it" is useless IMHO. You either want a restart or you don't. If there's an error serious enough to prevent shutdown, you want to look into it anyways. But since your use-case apparently calls for this functionality, go ahead, do it, and have fun ;) I'd probably -1 any proposed patches as useless bloat. Yoav Shapira http;//www.yoavshapira.com This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat synchronous shutdown?
Hi, >Will tomcat wait until time consuming requests are completed before >shutting >down? No. Yoav Shapira http://www.yoavshapira.com This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat synchronous shutdown?
Will tomcat wait until time consuming requests are completed before shutting down? /rob - Original Message - From: "Shapira, Yoav" <[EMAIL PROTECTED]> To: "Tomcat Users List" <[EMAIL PROTECTED]> Sent: Wednesday, December 08, 2004 9:36 PM Subject: RE: Tomcat synchronous shutdown? Hi, The Tomcat shutdown script provides support for a -force option, which does a kill -9 on the process ID after the normal shutdown. If you want something beyond that, do it yourself. Accounting for reasons like an OOME or your own code spawning non-daemon threads is outside Tomcat's scope. "If it takes too long" is a vague criterion at best, as conditions and use-cases wildly differ. Yoav Shapira http://www.yoavshapira.com >-Original Message- >From: Kevin A. Burton [mailto:[EMAIL PROTECTED] >Sent: Wednesday, December 08, 2004 3:26 PM >To: Tomcat Users List >Subject: Tomcat synchronous shutdown? > >Currently Tomcats shutdown model is to "politely request" that the >server shutdown. > >Most of the time Tomcat is friendly and will shutdown as requested but >sometimes it won't do as its told and run forever. This seems to happen >if a shutdown hook has problems or it runs out of memory. This is >happening to us now that we're on 5.5. > >Is there a way to: > >1. Make Tomcat's ./bin/shutdown.sh script block until it shutdown >2. Return a status code about the shutdown success >3. Optionally terminate the java process with a -9 if it takes too long > >The same should happen for Tomcat startup btw... > >Thoughts? > >Kevin > >-- > >Use Rojo (RSS/Atom aggregator). Visit http://rojo.com. Ask me for an >invite! Also see irc.freenode.net #rojo if you want to chat. > >Rojo is Hiring! - http://www.rojonetworks.com/JobsAtRojo.html > >If you're interested in RSS, Weblogs, Social Networking, etc... then you >should work for Rojo! If you recommend someone and we hire them you'll >get a free iPod! > >Kevin A. Burton, Location - San Francisco, CA > AIM/YIM - sfburtonator, Web - http://peerfear.org/ >GPG fingerprint: 5FB2 F3E2 760E 70A8 6174 D393 E84D 8D04 99F1 4412 > > >- >To unsubscribe, e-mail: [EMAIL PROTECTED] >For additional commands, e-mail: [EMAIL PROTECTED] This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat synchronous shutdown?
Shapira, Yoav wrote: Hi, The Tomcat shutdown script provides support for a -force option, which does a kill -9 on the process ID after the normal shutdown. If you want something beyond that, do it yourself. Accounting for reasons like an OOME or your own code spawning non-daemon threads is outside Tomcat's scope. "If it takes too long" is a vague criterion at best, as conditions and use-cases wildly differ. "Too long" can be defined in a configuration file. The major problem is that Tomcat can't do a 'restart'. For example with mysql I can do a /etc/init.d/mysql restart and it will block until stop runs... then start. If stop returns an errorcode then it won't attempt to startup MySQL again. Kevin -- Use Rojo (RSS/Atom aggregator). Visit http://rojo.com. Ask me for an invite! Also see irc.freenode.net #rojo if you want to chat. Rojo is Hiring! - http://www.rojonetworks.com/JobsAtRojo.html If you're interested in RSS, Weblogs, Social Networking, etc... then you should work for Rojo! If you recommend someone and we hire them you'll get a free iPod! Kevin A. Burton, Location - San Francisco, CA AIM/YIM - sfburtonator, Web - http://peerfear.org/ GPG fingerprint: 5FB2 F3E2 760E 70A8 6174 D393 E84D 8D04 99F1 4412 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat synchronous shutdown?
Hi, The Tomcat shutdown script provides support for a -force option, which does a kill -9 on the process ID after the normal shutdown. If you want something beyond that, do it yourself. Accounting for reasons like an OOME or your own code spawning non-daemon threads is outside Tomcat's scope. "If it takes too long" is a vague criterion at best, as conditions and use-cases wildly differ. Yoav Shapira http://www.yoavshapira.com >-Original Message- >From: Kevin A. Burton [mailto:[EMAIL PROTECTED] >Sent: Wednesday, December 08, 2004 3:26 PM >To: Tomcat Users List >Subject: Tomcat synchronous shutdown? > >Currently Tomcats shutdown model is to "politely request" that the >server shutdown. > >Most of the time Tomcat is friendly and will shutdown as requested but >sometimes it won't do as its told and run forever. This seems to happen >if a shutdown hook has problems or it runs out of memory. This is >happening to us now that we're on 5.5. > >Is there a way to: > >1. Make Tomcat's ./bin/shutdown.sh script block until it shutdown >2. Return a status code about the shutdown success >3. Optionally terminate the java process with a -9 if it takes too long > >The same should happen for Tomcat startup btw... > >Thoughts? > >Kevin > >-- > >Use Rojo (RSS/Atom aggregator). Visit http://rojo.com. Ask me for an >invite! Also see irc.freenode.net #rojo if you want to chat. > >Rojo is Hiring! - http://www.rojonetworks.com/JobsAtRojo.html > >If you're interested in RSS, Weblogs, Social Networking, etc... then you >should work for Rojo! If you recommend someone and we hire them you'll >get a free iPod! > >Kevin A. Burton, Location - San Francisco, CA > AIM/YIM - sfburtonator, Web - http://peerfear.org/ >GPG fingerprint: 5FB2 F3E2 760E 70A8 6174 D393 E84D 8D04 99F1 4412 > > >- >To unsubscribe, e-mail: [EMAIL PROTECTED] >For additional commands, e-mail: [EMAIL PROTECTED] This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]