I've only had the system up and running a few days and as yet only have a handful of small documents on it. I'm also the only user right now. However the system keeps stalling and when I check the terminal it is almost always java OutOfMemory error messages. Often it is from trying to generate a preview. Sometimes uploading a document (never very big). Is there something I need to tweak? My set up is 6GB RAM, Ubuntu Server 14.04 64 bit, Core 2 Chip @ 2.5Ghz with a 1TB drive.
Code: Select all
In windows, the file to edit is setenv.bat (in the bin folder). There is an equivalent bash script. On first boot the first line will look a bit like this:catalina.bat run
Using CATALINA_BASE: "G:\xampp\tomcat"
Using CATALINA_HOME: "G:\xampp\tomcat"
Using CATALINA_TMPDIR: "G:\xampp\tomcat\temp"
Using JRE_HOME: "C:\Program Files (x86)\Java\jdk1.7.0_79\jre"
Using CLASSPATH: "G:\xampp\tomcat\bin\bootstrap.jar;G:\xampp\tomcat\bin\tomcat-juli.jar"
Error occurred during initialization of VM
Could not reserve enough space for object heap
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
set JAVA_OPTS=%JAVA_OPTS% -Xms256m -Xmx2048m -XX:+UseConcMarkSweepGC -Djava.awt.headless=trueWhere:
-Xms size in bytes
Sets the initial size of the Java heap.
The default size is 2097152 (2MB).
The values must be a multiple of, and greater than, 1024 bytes (1KB).
(The -server flag increases the default size to 32M.)
-Xmx size in bytesIf the Xmx is set too high then you get the could not reserve enough space error. 2G does not work for me.
Sets the maximum size to which the Java heap can grow.
The default size is 64M.
(The -server flag increases the default size to 128M.)
The maximum heap limit is about 2 GB (2048MB).
The `space for object heap` error is one about memory. The default Xmx setting in the install version of setenv.bat is 2048m. This just does not work for me. Using this does:
Code: Select all
This seems to be a Java 32bit problem. If you switch to Java 64bit then this probably goes away. Later on, you are going to encounter a different memory problem (malcmail - I think this is the one you have) which means adding in support for the PermSize:set JAVA_OPTS=%JAVA_OPTS% -Xms256m -Xmx1024m -XX:+UseConcMarkSweepGC -Djava.awt.headless=true
-XX:PermSize -XX:MaxPermSize are used to set size for Permanent Generation.Hence:
Permanent Generation: The Permanent Generation is where class files are kept. These are the result of compiled classes and jsp pages. If this space is full, it triggers a Full Garbage Collection. If the Full Garbage Collection cannot clean out old unreferenced classes and there is no room left to expand the Permanent Space, an Out of Memory error (OOME) is thrown and the JVM will crash.
Code: Select all
This then interferes with the max heap size, and you will see I have had to cut that to 512m. This is the best I can get on Windows Server 2008 64bit, with 32bit Java and XAMPP. On my current 12Gb Server with 64bit Java, I am trying:set JAVA_OPTS=%JAVA_OPTS% -Xms256m -Xmx512m -XX:PermSize=512m -XX:MaxPermSize=1g -XX:+UseConcMarkSweepGC -Djava.awt.headless=true
Code: Select all
It is running for now, but needs more testing.set JAVA_OPTS=%JAVA_OPTS% -Xms1g -Xmx2g -XX:PermSize=2g -XX:MaxPermSize=4g -XX:+UseConcMarkSweepGC -Djava.awt.headless=true