Jira Memory Error

Posted by Tully on Thu 07 October 2010

So this week I ran into memory errors with Jira. The exact error message that caused Jira to stop responding to requests was:

java.lang.OutOfMemoryError: PermGen space

After some research, I found out that this memory is not the common object heap space memory. This memory actually deals with the binary code of classes and methods. A good explanation of this error can be found here. After understanding what this error meant, I did some more research for increasing this particular type of memory. The solution I came up with is shown below.

In your favorite text editor open up the following file:


Replace the JAVA_OPTS line with the following:

export JAVA_OPTS="-Xms768m -Xmx1024m -XX:MaxPermSize=256m"

The above line sets my minimum memory size to 768mb and max size to 1020mb. It also sets the Perm size to 256MB. The default perm size varies. Mine was defaulted to 64mb.

After changing this variable, save the file and restart Jira.

Now login as an administrator. From the admin panel click the arrow next to Administrator and select System Info.

Now scroll down to the section Java VM Memory Statistics. From here you can view how much memory you have allocated to JIRA and how much is being used.