How to keep alive Jira and Confluence?

I have an instance of Jira that will always run out of memory after some time.

Does anyone has a good keep-alive daemon for it?

Note: it should be able to cope with human triggered restarts and manual shutdowns.

1 answer

Look, a quick and dirty script for you to start:

You will have to define some stuff in your env (JAVA_HOME, for instance) and register it in cron


# This assumes Jira runs as root. If not proper sudo commands should be in place


le=`grep "OutOfMemoryException" $JIRADAT_HOME/log/atlassian-jira.log | wc -l`
if [ "$le" != "0" ]
  pid=`cat $JIRABIN_HOME/work/`
  echo "Got exception, will act on pid $pid"
  sleep 30
  if [ -f $JIRADAT_HOME/.jira-home.lock ]
    echo "Sorry, forced removal "
    kill -9 $pid
    rm -rf $JIRADAT_HOME/.jira-home.lock
    rm -rf $JIRABIN_HOME/work/
  if [ ! -d $JIRADAT_HOME/oldlogs ]
    mkdir $JIRADAT_HOME/oldlogs
  mv $JIRADAT_HOME/log/*.log $JIRADAT_HOME/oldlogs/

Thanks Radu, still this does not solve the problem. in 99% of the cases, the VM got stuck doing garbage collections when it runs out of memory, but the process is still running, so that's not the proper way of keeping jira alive.

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Nov 27, 2018 in Portfolio for Jira

Introducing a new planning experience in Portfolio for Jira (Server/DC)

In the past, Portfolio for Jira required a high degree of detail–foresight that was unrealistic for many businesses to   have–in   order to produce a reliable long-term roadmap. We're tur...

2,695 views 18 21
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you