Missed Team ’24? Catch up on announcements here.

×
Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Out of memory

Chris Schulte March 27, 2020

I'm running Jira 8.6.1

Jira sometimes gets pretty sluggish and the log analyzer gave me "Jira server throws OutOfMemoryError: unable to create new native thread" and pointed to https://confluence.atlassian.com/jirakb/jira-server-throws-outofmemoryerror-unable-to-create-new-native-thread-224397455.html?utm_medium=logScan&utm_source=STP. 

The workaround is to add this to the :

ulimit -u 4096
ulimit -n 4096

 Though setenv.sh already has this going:

CURRENT_NOFILES_LIMIT=$( ulimit -Hn )
ulimit -Sn $CURRENT_NOFILES_LIMIT
ulimit -n $(( CURRENT_NOFILES_LIMIT > MIN_NOFILES_LIMIT ? CURRENT_NOFILES_LIMIT : MIN_NOFILES_LIMIT ))

Won't the workaround conflict with what is already there?

I looked at /proc/<pid>/limits and see this:

Max cpu time unlimited unlimited seconds
Max file size unlimited unlimited bytes
Max data size unlimited unlimited bytes
Max stack size 8388608 unlimited bytes
Max core file size 0 unlimited bytes
Max resident set unlimited unlimited bytes
Max processes 4096 15066 processes
Max open files 16384 16384 files
Max locked memory 65536 65536 bytes
Max address space unlimited unlimited bytes
Max file locks unlimited unlimited locks
Max pending signals 15066 15066 signals
Max msgqueue size 819200 819200 bytes
Max nice priority 0 0
Max realtime priority 0 0
Max realtime timeout unlimited unlimited us

The hard limit for max processes is 15066. Is that the problem I'm having?

 

Thanks,

Chris

 

1 answer

1 accepted

0 votes
Answer accepted
Barry Allen
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 28, 2020

Hi Chris Schulte,

  • Open your setenv.sh
  • find variable named JVM_MAXIMUM_MEMORY
  • set it as JVM_MAXIMUM_MEMORY="3072m" and restart.
  • Still you are facing this error JVM_MAXIMUM_MEMORY="4096m" and restart.

 

If it is not working even after above steps, please let me know your system configurations like

  1. System OS
  2. Version
  3. System memory
  4. RAM memory
  5. Jira version
  6. Java version
Chris Schulte March 29, 2020

Thank you Barry Allen,

I set the JVM_MAXIMUM_MEMORY="3072m". I'm going to keep an eye on the logs and see how the performance goes. 

Barry Allen
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 29, 2020

I am glad that I helped you :) .

It will be helpful for other user, if you mark my answer as best answer.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
SERVER
TAGS
AUG Leaders

Atlassian Community Events