«« Next » « Previous
«« Next » « Previous

Link Details

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.
Link 79156 thumbnail

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.
  • 17
  • 1
  • 1358
  • 452

Comments

Add your comment
User 236137 avatar

dzonelurker replied ago:

-1 votes Vote down Vote up Reply

What's the point? Really.

User 210175 avatar

jtheory replied ago:

0 votes Vote down Vote up Reply

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.

User 75637 avatar

adobni replied ago:

0 votes Vote down Vote up Reply

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.

Add your comment


Html tags not supported. Reply is editable for 5 minutes. Use [code lang="java|ruby|sql|css|xml"][/code] to post code snippets.