According to the XWiki docs, 1GB should be sufficient to run XWiki.
https://www.xwiki.org/xwiki/bin/view/Documentation/AdminGuide/Performances/#HMemory
For Java 8 (i.e. XWiki >= 8.1). Notice that there's no permgen anymore in Java 8: Small and medium installs: A minimum of 1024MB (-Xmx1024m)
I installed and configured Tomcat according to the documentation.
I have (in conf/tomcat.conf
)
JAVA_OPTS="-Djava.security.egd=file:/dev/./urandom -Djava.awt.headless=true -Xmx750m -XX:MaxPermSize=125m -XX:+HeapDumpOnOutOfMemoryError"
And sometimes
JAVA_OPTS="-Djava.security.egd=file:/dev/./urandom -Djava.awt.headless=true -Xmx1024m -XX:MaxPermSize=192m -XX:+HeapDumpOnOutOfMemoryError"
And it is crashing randomly. I cannot even add another user. This is the first part of the dump file hs_err_pid11420.log
# There is insufficient memory for the Java Runtime Environment to continue.
# Native memory allocation (mmap) failed to map 105709568 bytes for committing reserved memory.
# Possible reasons:
# The system is out of physical RAM or swap space
# The process is running with CompressedOops enabled, and the Java Heap may be blocking the growth of the native heap
# Possible solutions:
# Reduce memory load on the system
# Increase physical memory or swap space
# Check if swap backing store is full
# Decrease Java heap size (-Xmx/-Xms)
# Decrease number of Java threads
# Decrease Java thread stack sizes (-Xss)
# Set larger code cache with -XX:ReservedCodeCacheSize=
# JVM is running with Unscaled Compressed Oops mode in which the Java heap is
# placed in the first 4GB address space. The Java Heap base address is the
# maximum limit for the native heap growth. Please use -XX:HeapBaseMinAddress
# to set the Java Heap base and to place the Java Heap above 4GB virtual address.
# This output file may be truncated or incomplete.
#
# Out of Memory Error (os_linux.cpp:2766), pid=11420, tid=0x00007fcd0d720700
#
# JRE version: OpenJDK Runtime Environment (8.0_212-b04) (build 1.8.0_212-b04)
# Java VM: OpenJDK 64-Bit Server VM (25.212-b04 mixed mode linux-amd64 compressed oops)
I am not using HSQLDB. I am using Postgresql on the same server.
CentOS Linux release 7.6.1810 (Core), XWiki 10.11.8