Page History
...
When the Maximum Heap Space size is too low for that is actually needed by the Java process, the following exception will be thrown: java.lang.OutOfMemoryError: Java heap space
Java Perm Space (java 7)
The Perm Space is the space used by Java to store loaded classes and other static objects. The setting related to the Java Perm Space is only the following.
...
The above mentioned settings are settings that can be applied when launching a Java process command-line or form a .bat/.sh script. Certain application might provide other ways to specify the same settings, for example the Service component that is part of the Servoy distribution. For more information on how to configure these settings withing Servoy, read the next paragraph.
Java metaspace (java 8 and higher)
Java 8 changed the way it stored classes and is using now native memory for that instead of a special java heap
these settings can be adjusted by using the following vm arguments:
-XX:MetaspaceSize=200M -XX:MaxMetaspaceSize=200M -XX:MinMetaspaceFreeRatio=0 -XX:MaxMetaspaceFreeRatio=100
this sets it to use 200MB for that if you get a java.lang.OutOfMemoryError: metaspace because a lot of plugins are used then you need to update that value to something higher like 300/400.
Server Memory Management
Memory management for a Servoy Application Server revolves around managing the values for the Java Heap Space and Java Perm Space.
...
Code Block |
---|
java ... -Djava.awt.headless=true -Xmx1280m -Xms64m -XX:MetaspaceSize=200M -XX:MaxMetaspaceSize=200M -XX:MinMetaspaceFreeRatio=0 -XX:MaxPermSizeMaxMetaspaceFreeRatio=128m100 ..... |
Note | ||
---|---|---|
| ||
When specifying the -Xmx and -Xms values, the following needs to be taken into account:
In a default Servoy Application Server installation, the Maximum Heap Space value (-Xmx) is set to 1280m. For servers that have limited memory, this value could be too high, resulting in the following error when trying to start the server:
Either lower the -Xmx value or make sure that more memory is available for the Java process on the server, by closing other applications or adding more physical memory to the server. |
...