Reliable restart of the weblogic server

Everyone doing CI using an application server knows the problem: After some time you get OutOfMemoryError because of the excessive deployments.

The solution for this is to restart the application server periodically. But before you can start the application server, you must be sure to shut the application server down. This can be done for the weblogic with the stopWebLogic.sh script.

But what happens if the application server is already out of memory or has an other problem and is not going to shut down? This can be solved by killing the process on OS level.

Because I don’t want to kill the process always, I have written a script to first shutdown the server gracefully and if it doesn’t work, to kill the process. The script is executed from hudson remotely by a cron rule.

The script additionally appends the last lines of the server output after the restart to the log of the hudson job.

Bernhard Mähr @ OPITZ-CONSULTING published at http://thecattlecrew.wordpress.com/

Leave a Reply