Tomcat can fail to shutdown. The problem
is that when Tomcat is stopped, it waits indefinitely for all deployed
web applications to fully clean up before exiting. There is a known
issue with stopping deployed SAS Web Application projects while the
Web Infrastructure Platform middle tier remains running, preventing
the SAS Web Application project from fully cleaning up. When Tomcat
fails to shutdown within the stop time-out, a dialog box asks if you
want to terminate the process. Terminating Tomcat from this dialog
box is the only way stop the server in this situation.
The Restart command
does not handle the time-out issue well, and leaves the Tomcat process
in a permanent “stopping” state without ever displaying
the dialog box that asks you if you want to terminate the server.
Further, a new Tomcat process is launched while the old Tomcat process
is running. The new process runs normally because the old process
was able to complete enough of the shutdown to free the ports that
it was using. However, the old process continues to run and occupy
nearly the same amount of memory that it was using during normal operation.
The only way to stop an old Tomcat process is to either restart Eclipse
or manually kill the old Tomcat process.
Instead of using the
Restart command from the
Servers tab or when
you confirm a restart when using
Run AsRun on Server, you should separately
Stop and then Start the server.
Although some servers
might offer you the ability to omit restarting, when a class on the
server changes, you should stop and then start the server so that
the updated files are picked up by the server. Doing this also avoids
potential memory leaks.