Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Out of Memory Problem

Georgios Dimitrakakis March 22, 2018

Hello!

I have a problem with my JIRA server which is hosted on a self-hosted virtual machine on AWS. The server has 4GB of RAM and hosts Jira Software (with Jira Core) and Jira ServiceDesk. Currently there are 4users on it and around 500issues on 20projects. Frequently I am getting the following error on "catalina.out":

# There is insufficient memory for the Java Runtime Environment to continue.
# Native memory allocation (mmap) failed to map 374341632 bytes for committing reserved memory.
# An error report file with more information is saved as:
# //hs_err_pid6482.log

and has as a result the termination of Java process so my instance is unavailable.

 

In my setenv.sh environment I have set:

JVM_MINIMUM_MEMORY="1024m"
JVM_MAXIMUM_MEMORY="2560m"

 

What can be done in order to make it work without this problem? Is the maximum memory too much?

 

From the add-ons page I have checked and I don't have add-ons enabled that I don't need and that are not part of the integrated services.

 

Any ideas what can be done to avoid this frequent instability ?

 

Best regards,

 

G.

4 answers

1 vote
Christian Reichert (resolution)
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.
March 22, 2018

Hi @Georgios Dimitrakakis,

In your case, I'd probably set min & max to the same Value of 1 GB. This should be enough for your size.

If you are using AMI, the Amazon Linux, then you could also consider adding couple of Gig SWAP Space & monitor if it gets used. Adding SWAP is generally a bad idea, as it slows things down if it's heavily used. 
However it also provides a buffer against such a "hard" crash that you describe, so if the out of memory is only caused a few times a day due to some other processes .. then it might be an appropriate solution. If it gets used all the time, you may need a bigger instance.


Cheers,
   Christian

1 vote
NotTheRealStephenSifersNOPENOPENOPENOPE
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.
March 22, 2018

Please review the Jira performance tuning documentation here
https://confluence.atlassian.com/adminjiraserver073/increasing-jira-application-memory-861253796.html

Also be aware of Java outofmemoryerror as well
https://confluence.atlassian.com/jirakb/jira-applications-crash-due-to-outofmemoryerror-java-heap-space-191069.html

Please send a screen shot of what your performance is on your Jira server (memory wise):

Determine JIRA application usage patterns

Choose (sprocket) > System. Select Troubleshooting and Support > System Info to open the System Info page. Then, scroll down the page to view the Java VM Memory Statistics section, and look at the memory graph during times of peak usage:

1 vote
Sloan
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.
March 22, 2018

Hi @Georgios Dimitrakakis

What OS are you Using? Windows or a Linux?

The message indicates that your VM ran out of RAM. So you might need to increase the available RAM.

If Jira reserves 2 GB of memory there is only 2 GB left for the OS and other applications. Keep in mind that not only Jira uses the RAM. ;)

With only 4 users you might be able to lower the maximum heap memory safely to 1 GB.

Best Regards
Niklas

0 votes
Georgios Dimitrakakis April 16, 2018

Hello all!

 

Thank you all very much for your time and I apologize for taking me so long to reply but unfortunately some personal problems kept me away.

 

I have taken your suggestions into account, investigated a little bit further the issue and have set both JVM_MINIMUM_MEMORY and JVM_MAXIMUM_MEMORY to "1024m".

 

The instance is running without hitting again the Out of Memory Problem for a few weeks now and although there wasn't increased traffic this interval due to Easter vacations it's a good starting point that it hasn't failed since the change.

For the moment I am not using any swap space on my VM but I will consider using if I hit the problem again and I will also review the application usage pattern.

 

Best regards,

 

G.

Suggest an answer

Log in or Sign up to answer