Versions Compared


  • This line was added.
  • This line was removed.
  • Formatting was changed.


Often when shutting down Tomcat, it does not shutdown gracefully and have to result in using the "kill -9" command. Using kill is not a good practice since it is not let the application do the cleanup during the shutdown process and can have undesirable side effects.

To avoid this, on Linux, there is an option to use PID during startup and shutdown. To use the same, follow the below steps:

  1. Create a file in Tomcat$TOMCAT_DIR/bin folder
  2. Edit this file and set the variable CATALINA_PID with the pid.txt file path.Note: pid .txt file created at runtime in Tomcat/bin folder when tomcat gets started.

    Code Block

  3. When using, use the option -force

    Code Block
    titleExample -force