Affected version(s): all
Symptom
One of the Open-Xchange services is not starting or causing problems. In the logs you see OOM messages like (but not limited to):
java.lang.OutOfMemoryError: unable to create new native thread
Root Cause
It is possible that there is a wrong allocation of memory to the Open-Xchange process or not enough memory overall.
Solution
System memory
Check first if the node has enough memory assigned, using system tools like top or free. Also, have a look if other processes are claiming too much memory.
Process memory
The main memory configuration of the Open-Xchange middleware can be found here:
/opt/open-xchange/etc/ox-scriptconf.sh
JAVA_OPTS_MEM="-XX:MaxHeapSize=2048M ...
If you kept updating the system it might be still called Xmx or is not in JAVA_OPTS_MEM. 2048M is just an example for a test system and isn't enough for a real live system. After a change you need to restart the open-xchange service.
Don't confuse the above with:
JAVA_OXCMD_OPTS="-Djava.net.preferIPv4Stack=true -Xmx50m"
This is only for the command line tools. Nevertheless, on larger installations when you run out of memory (directly visible on the command line) when calling one of the tools, you need to change this value too.
Systemd memory limits
Also check the memory restrictions for systemd
systemctl daemon-reloadsystemctl show open-xchange | grep LimitAS
If this is unlimited, it will show "infinity".
You can change the limits in:
/etc/systemd/system/open-xchange.service.d/limits.conf
Just add:
LimitAS=<limit in bytes> LimitASSoft=<limit in bytes>
After a change you need to reload the systemd daemon:
systemctl daemon-reload
And restart the open-xchange process. Documentation about the possible parameters can be found in the man pages of systemd:
man systemd.exec
Related articles