Forums

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

fatal: Out of memory, malloc failed (tried to allocate 2282218975 bytes)

Alexander_Liebrecht May 30, 2018

Hello Community and DEvelopers,

I installed Atomicorp Linux Secure today and after uninstalling my Linux OS I was a little bit misconceived. If I do "sh start-confluence.sh -fg" I will see that.

Server startup logs are located in /opt/atlassian/confluence/logs/catalina.out
---------------------------------------------------------------------------
Using Java: /opt/atlassian/confluence/jre//bin/java
Java HotSpot(TM) 64-Bit Server VM warning: INFO: os::commit_memory(0x0000037f7d000000, 2555904, 1) failed; error='Operation not permitted' (errno=1)
Java HotSpot(TM) 64-Bit Server VM warning: INFO: os::commit_memory(0x00000353d5000000, 2555904, 1) failed; error='Operation not permitted' (errno=1)
#
# There is insufficient memory for the Java Runtime Environment to continue.
# Native memory allocation (mmap) failed to map 2555904 bytes for committing reserved memory.
# An error report file with more information is saved as:
# /tmp/hs_err_pid67865.log

How can I solve the problem with Centos 7.4 and Confluence Server in the very last version?

Thanks in advance.

My previous solutions and what I found on Google unfortunately did not succeed. Therefore, I hope to find help here.

Alexander

P.S. Output of hs_err_pid67865.log is so:

Memory: 4k page, physical 65909196k(50194900k free), swap 8388604k(8388604k free)

vm_info: Java HotSpot(TM) 64-Bit Server VM (25.162-b12) for linux-amd64 JRE (1.8.0_162-b12), built on Dec 19 2017 21:15:48 by "java_re" with gcc 4.3.0 20080428 (Red Hat 4.3.0-8)

time: Wed May 30 15:19:56 2018
elapsed time: 0 seconds (0d 0h 0m 0s)

 

1 answer

0 votes
Nic Brough -Adaptavist-
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.
May 30, 2018

What have you got in setenv.sh (same directory as start-confluence.sh) for the -Xmx parameter?

Can you also try

cat /proc/memstat

on the box, and give us the first three lines?  (Or MemTotal at least)

Alexander_Liebrecht May 30, 2018
CATALINA_OPTS="-XX:-PrintGCDetails -XX:+PrintGCDateStamps -XX:-PrintTenuringDistribution ${CATALINA_OPTS}"
CATALINA_OPTS="-Xloggc:$LOGBASEABS/logs/gc-`date +%F_%H-%M-%S`.log -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=5 -XX:GCLogFileSize=2M ${CATALINA_OPTS}"
CATALINA_OPTS="-XX:G1ReservePercent=20 ${CATALINA_OPTS}"
CATALINA_OPTS="-Djava.awt.headless=true ${CATALINA_OPTS}"
CATALINA_OPTS="-Datlassian.plugins.enable.wait=300 ${CATALINA_OPTS}"
CATALINA_OPTS="-Xms2G -Xmx2G -XX:+UseG1GC ${CATALINA_OPTS}"
CATALINA_OPTS="-Dsynchrony.enable.xhr.fallback=true ${CATALINA_OPTS}"
CATALINA_OPTS="-Dorg.apache.tomcat.websocket.DEFAULT_BUFFER_SIZE=32768 ${CATALINA_OPTS}"
CATALINA_OPTS="${START_CONFLUENCE_JAVA_OPTS} ${CATALINA_OPTS}"
CATALINA_OPTS="-Dconfluence.context.path=${CONFLUENCE_CONTEXT_PATH} ${CATALINA_OPTS}"
CATALINA_OPTS="-XX:ReservedCodeCacheSize=256m -XX:+UseCodeCacheFlushing ${CATALINA_OPTS}"
JAVA_OPTS="-Xms1024m -Xmx1024m -XX:MaxPermSize=1024m"
Nic Brough -Adaptavist-
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.
May 30, 2018

And the memstat output?

Alexander_Liebrecht May 30, 2018

Which directory do I have to execute the last SSH command from? Under "cd ~" the directory can not be found and under /opt/atlassian/confluence/bin either.

What am I doing wrong? Thank you.

Alexander_Liebrecht May 30, 2018

free -m
total used free shared buff/cache available
Mem: 64364 6937 40221 545 17204 55986
Swap: 8191

Nic Brough -Adaptavist-
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.
May 30, 2018

Please try

cat /proc/memstat

on the box, and give us the first three lines?  (Or MemTotal at least)

Alexander_Liebrecht May 30, 2018

cat /proc/memstat
cat: /proc/memstat: No such file or directory

Nic Brough -Adaptavist-
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.
May 30, 2018

Hmm, sorry.   How about

cat /proc/meminfo

Alexander_Liebrecht May 30, 2018
 cat /proc/meminfo
MemTotal: 65909196 kB
MemFree: 58934204 kB
MemAvailable: 59997852 kB
Buffers: 147448 kB
Cached: 1864088 kB
SwapCached: 0 kB
Active: 5337344 kB
Inactive: 997968 kB
Active(anon): 4414724 kB
Inactive(anon): 385612 kB
Active(file): 922620 kB
Inactive(file): 612356 kB
Unevictable: 0 kB
Mlocked: 0 kB
SwapTotal: 8388604 kB
SwapFree: 8388604 kB
Dirty: 27464 kB
Writeback: 0 kB
AnonPages: 4323688 kB
Mapped: 690016 kB
Shmem: 476552 kB
Slab: 376760 kB
SReclaimable: 246132 kB
SUnreclaim: 130628 kB
KernelStack: 13616 kB
Alexander_Liebrecht June 3, 2018

Hi,
can not you help me anymore? I'm stuck, because all Google solutions already tried. I have already changed the values in setenv.sh to 8G. Still no success.

Nic Brough -Adaptavist-
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.
June 3, 2018

Sorry, I missed the last update.

You've got 6Gb on the machine, and have given Confluence 2Gb max, so I don't know why it's failing to allocate 2Gb.  I'm afraid I'm stuck, I've not seen a Tomcat do this before.

I'd be interested to see if Confluence runs ok with the plain default configuration though

Alexander_Liebrecht June 7, 2018

Hi Nic,

Thanks for your Time and Hints. My Problem is solved. 

A peculiar Linux security solution crashed my centos 7.5 rootserver and so java was also changed. I completely reinstalled the server and Java 8 was added. Of course, Confluence runs very well with the default configuration settings and I then reinstalled Confluence from scratch.

Everything good up here. Thank you for the help.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events