- How to fix it?” – Tomcat – java.lang.OutOfMemoryError: PermGen space.
- Plus here we can find – “Explaining java.lang.OutOfMemoryError: PermGen space” – how to monitor Memory usage
- And here we can read more about OutOfMemory and other Memory ERROR MESSAGES fixing.
If you get the error message: java.lang.OutOfMemoryError: PermGen space this means that you have exceeded Java’s default 64Mb block for loading class files. This can happen if many plugins are installed. You may want to increase the PermGen memory size to suit your needs.
In the following sample, the blue parameter shows how the PermGen Memory has been set to 192 megabytes. This value should be set depending on your memory requirements. 192m should be sufficient for Confluence even when many plugins are installed.
Note: The other parameters in this sample are just shown to give you some context, and are not part of this example.
java.lang.OutOfMemoryError: Java Heap Space
Heap space memory errors occur when the application has to deal with large amounts of data or users. These errors will contain only a java.lang.OutOfMemoryError, e.g. without the reference to PermGen space as above. You should try to increase the heap size to solve this problem. This requires configuring the Xmx and Xms parameters. In the following example, the maximum heap size is set to 1024 megabytes. This should be enough for small to medium deployments.
Deployments with high usage patterns may require additional memory. For high-usage deployments, it is recommended to set both Xms and Xmx as the same value (eg. -Xms1024m -Xmx1024m), provided the memory is available. On the other hand, adding too much memory can also cause problems (see below), so you should increment memory carefully, for example in increments of 128 megabytes.