Memory issues
Java out of memory
If the JVM does not have enough memory, java.lang.OutOfMemoryError
may appear in the startup log and Magnolia may fail to start.
Exception in thread "Timer-1" java.lang.OutOfMemoryError: Java heap space
at org.apache.jackrabbit.core.query.lucene.IndexingQueue.getFinishedDocuments
A solution is to increase Java heap size to allocate more memory to the JVM.
-
Stop the server (
./magnolia_control.sh stop
). -
Open the
/apache-tomcat/bin/setenv.sh
file (/apache-tomcat/bin/setenv.bat
on Windows) in a text editor. -
Edit the
Xmx
parameter to set a new maximum heap size.The default size for Magnolia is
2048M
. Try a higher number, for example,4096M
. -
Save the file and start the server (
./magnolia_control.sh start && tail -f ../logs/catalina.out
).
High memory usage when bootstrapping content on first startup
When importing content on first startup or installation, you may experience high memory usage or even an OutOfMemoryError
(OOME) exception.
The reason is that Jackrabbit keeps all changes in a transient space (and hence in memory) until the session is saved.
If the Unable to complete bootstrapping: out of memory.
message is displayed, try to increase the maximum Java heap size with the -Xmx
parameter in the server startup script.
You can also alleviate the issue by disabling the Jackrabbit search index for the import (commenting out the Magnolia index configuration in the workspace.xml configuration file(s)).
|