JIRA java.lang.OutOfMemoryError: PermGen space

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

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.

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

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?

Yep, it worked as solution.

You need to modify the MaxPermSIze.

1 vote

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.

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!

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.

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.

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published Thursday in Jira

5 ways you can make the most of Jira Software and Bitbucket Cloud

As part of the Bitbucket product team I'm always interested in better understanding what kind of impact the use of our tools have on the way you work. In a recent study we conducted of software devel...

80 views 0 5
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