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

This widget could not be displayed.

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.

This widget could not be displayed.

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.

This widget could not be displayed.

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
Atlassian Summit 2018

Meet the community IRL

Atlassian Summit is an excellent opportunity for in-person support, training, and networking.

Learn more
Community showcase
Posted Wednesday in New to Jira

Are you planning to trial, or are currently trialling Jira Software? - We want to talk to you!

Hello! I'm Rayen, a product manager at Atlassian. My team and I are working hard to improve the trial experience for Jira Software Cloud. We are interested in   talking to 20 people planning t...

155 views 2 0
Join discussion

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