JIRA java.lang.OutOfMemoryError: PermGen space

Tom Jones June 1, 2012

I am running JIRA from war file on Win7.

1) Java 6

2) Tomcat 6

3) Jira 5

I installed JIRA yesterday. I was able to get into JIRA web application yesterday and was configuring JIRA, until I entered licence key and TomCat gave me PermGen space error.

So far I have been trying googleing for hours and trying stuff, but nothing seems to work. At the moment I have this snippet in my tomcat->catalina.sh file. Yes I tried putting this to setenv.sh(bat) file, but still same error. So far have not been able to get Jira up and running again.

JAVA_OPTS="-Djava.awt.headless=true -Dfile.encoding=UTF-8 
-server -Xms1536m -Xmx1536m
-XX:NewSize=512m -XX:MaxNewSize=512m -XX:PermSize=512m 
-XX:MaxPermSize=1024m -XX:+DisableExplicitGC"

Error:

2012-06-02 12:02:52,821 main INFO      [atlassian.plugin.loaders.ScanningPluginLoader] Plugin Unit: C:\JIRA\home\plugins\.bundled-plugins\streams-api-5.1.0.jar (1337537820000) created
2012-06-02 12:02:52,828 main INFO      [atlassian.plugin.loaders.ScanningPluginLoader] Plugin Unit: C:\JIRA\home\plugins\.bundled-plugins\streams-core-plugin-5.1.0.jar (1337537822000) created
2012-06-02 12:02:52,839 main INFO      [atlassian.plugin.loaders.ScanningPluginLoader] Plugin Unit: C:\JIRA\home\plugins\.bundled-plugins\streams-inline-actions-plugin-5.1.0.jar (1337537822000) created
2012-06-02 12:02:52,845 main INFO      [atlassian.plugin.loaders.ScanningPluginLoader] Plugin Unit: C:\JIRA\home\plugins\.bundled-plugins\streams-jira-inline-actions-plugin-5.1.0.jar (1337537822000) created
2012-06-02 12:02:53,068 main INFO      [atlassian.plugin.loaders.ScanningPluginLoader] Plugin Unit: C:\JIRA\home\plugins\.bundled-plugins\streams-jira-plugin-5.1.0.jar (1337537820000) created
2012-06-02 12:02:53,083 main INFO      [atlassian.plugin.loaders.ScanningPluginLoader] Plugin Unit: C:\JIRA\home\plugins\.bundled-plugins\streams-spi-5.1.0.jar (1337537822000) created
2012-06-02 12:02:53,093 main INFO      [atlassian.plugin.loaders.ScanningPluginLoader] Plugin Unit: C:\JIRA\home\plugins\.bundled-plugins\streams-thirdparty-plugin-5.1.0.jar (1337537822000) created
2012-06-02 12:02:53,113 main INFO      [atlassian.plugin.loaders.ScanningPluginLoader] Plugin Unit: C:\JIRA\home\plugins\.bundled-plugins\workflow-designer-plugin-2.5.5.jar (1337537818000) created
2012-06-02 12:03:01,127 Spring executor 1 INFO      [plugins.monitor.rrd4j.RrdUpdater] Reusing existing RrdDb: C:\JIRA\home\monitor\ConnectionPoolGraph.rrd4j
2012-06-02 12:03:01,220 Spring executor 1 INFO      [plugins.monitor.rrd4j.RrdUpdater] Reusing existing RrdDb: C:\JIRA\home\monitor\DatabaseReadWritesGraph.rrd4j
2012-06-02 12:03:01,319 Spring executor 1 INFO      [jira.plugins.monitor.MonitoringScheduler] Scheduling metrics collector to run every 10000ms...
2012-06-02 12:03:50,998 Spring executor 4 WARN      [beans.factory.support.DefaultListableBeanFactory] FactoryBean threw exception from getObjectType, despite the contract saying that it should return null if the type of its object cannot be determined yet
java.lang.OutOfMemoryError: PermGen space

Notice the Tomcat stops for 49 seconds on "Scheduling metrics collector to run every 10000ms...".

3 answers

1 accepted

1 vote
Answer accepted
Tom Jones June 1, 2012

Instead of changing Initial Memory Pool and Maximum memory pool in tomcat6w, add following line to Java Options in Java tab:

-XX:MaxPermSize=512m

This solution works when using Tomcat as service.

1 vote
Jobin Kuruvilla [Adaptavist]
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 1, 2012

Can you go to Administration > System Info after JIRA is started and see if the memory change is effective or not? For example, if you are running as a service, changes to setEnv.sh won't be effective.

Jobin Kuruvilla [Adaptavist]
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 1, 2012
Jobin Kuruvilla [Adaptavist]
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 1, 2012

You mean, it is not even starting up? I have seen permgen errors mostly when you try to do stuff in JIRA. Sorry, that doesn't seem to be the case here.

You should be able to see the memory allocated in the startup logs too, if you get that far!

Tom Jones June 1, 2012

How do I get to JIRA UI, when I can't deploy it with TomCat, it gives me PermGen error? Am I misunderstanding something, heh.

Tom Jones June 1, 2012

Not sure where to see if memory change is effective from Admin -> System, is that Linux? I have tried running both, service and from startup. My tomcat6w GUI has settings under Java tab : "Initial memory pool : 256 " , "Maximum memory pool : 512 ". Both still give me PermGen error.

1 vote
Norman Abramovitz
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 1, 2012

Did you try increasing the memory for Jira's service yet? This link talks about the available memory for a service, but it also the same place where you need to set permGen memory as well.

"Windows Service
See the guide Increasing JIRA Memory. Scroll to the part of the discussing Permanent Generation Space. Pay specific attention to where to apply the settings especially if you are using a Windows Service, and follow the instructions for changing the PermGen Space Parameters rather than the Heap Space Parameters."

https://confluence.atlassian.com/display/JIRA044/Increasing+JIRA+Memory

Tom Jones June 1, 2012

Look first line, I am running on Windows 7. My tomcat6w GUI has settings under Java tab : "Initial memory pool : 256 " , "Maximum memory pool : 512 ". That should increase JIRA memory right?

Tom Jones June 1, 2012

Yep, it worked as solution.

Norman Abramovitz
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 1, 2012

You need to modify the MaxPermSIze.

Suggest an answer

Log in or Sign up to answer