Confluence xwork action causes `java.lang.OutOfMemoryError: Java heap space

SabarishkSekarN April 20, 2015

In my plugin, I am an calling xwork action, the action implements a benable interface which returns a json object on called. The result will be then rendered in a soy template.

I get an heap space error when i execute this action. I tried to increase the heap memory as suggested in confluence tutorial but ended up with no luck.

I here with attach the error log , any help would be appreciated

Thanks in advance

2 answers

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

0 votes
SabarishkSekarN April 20, 2015

Hi Renato,

Thank you for the reply. I tried you suggestions but still no luck.

I am using Confluence version : 5.6.5 and Build Number 5638

For adjusting the heap size, I added a new setenv.sh file with the following content

 

export CATALINA_OPTS="$CATALINA_OPTS -Xms1024m"
export CATALINA_OPTS="$CATALINA_OPTS -Xmx1024m"
export CATALINA_OPTS="$CATALINA_OPTS -XX:MaxPermSize=384m"

 

 in the following path  

../target/container/tomcat6x/apache-tomcat-6.0.20/bin.  but I couldnt see the changes being reflected after restarting the confluence instance. I ran into the same set of errors as in my error log.

JVM stats from Confluence after the changes 

currentMemoryStat.png



Also I observed a new behaviour, in the confluence action I mentioned before, I perform REST GET requests to JIRA and I get reopens in size of more than an 1MB each time. Initially my plugin runs fine without any issues after some 30 requests it throws the heap size error. will increasing the heap size fix this problem?

rrudnicki
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
April 21, 2015

Hello, 

 

Usually, increasing the heap size should help, but this isn't a rule. I recommend you to try this configuration:

-Xms1024m -Xmx2048m -XX:MaxPermSize=512m

 

In case doesn't work, please open a ticket with Atlassian and attach a heap dump on that. 

 

Regards, 

Renato Rudnicki

0 votes
rrudnicki
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
April 20, 2015

Hi SabarishkSekar,

 

Can you let us know what Confluence version you are running and what is the memory configured?

If you try to setup -Xms1024m -Xmx1024m -XX:MaxPermSize=384m the issue still persist?

 

Best regards, 

Renato Rudnicki

TAGS
AUG Leaders

Atlassian Community Events