Announcement
iPhone DZone: Fresh Links On Your iPhone by matt at Sat Jul 05 14:09:51 EDT 2008
Reading DZone on your iPhone just got a little bit easier. Visit http://dzone.com/iphone from your iPhone to try out our beta iPhone support. You can view stories, filter by tags, and login. We'd appreciate your feedback at feedback@dzone.com.
Our ESP isn't working very well. Login and vote now.
By bloid
via groovygrails.de
Published: May 05 2008 / 22:16
I like to do things the right and clean way. And shutting down a service under Linux is done by calling the start-/stop-script under /etc/init.d with the parameter stop. Even graphical front-ends, may they be YAST or webmin or whatever stick to this rule. The advantage is, the whole know-how of how to shutdown one specific service is hidden in the start-/stop-script. Killing a process directly is real evil, because the process (and dependend processes) don't get the chance to do whatever they have to before shutting down. Otherwise databases get corrupted, stale files claim disk space, memory is hogged by zombie processes and the like.
Comments
dzonelurker replied ago:
What's the point? Really.
jtheory replied ago:
If you seriously don't have the memory to launch a separate JVM to stop tomcat, isn't that a pretty good sign that your *app* is basically screwed if a few dozen extra users show up?
This hack makes sense if you're in a really memory-constrained environment -- but if you're in a really memory-constrained environment, then Tomcat is probably not the right tool for you.
adobni replied ago:
Perhaps but you may need to make tomcat restart in production you don't have the time to do debug, refactor and optimize.
And what's the point in wasting megabytes of RAM just to send the string SHUTDOWN to a port?
It's a good tip.
Voters For This Link (17)
Voters Against This Link (1)