Issue:
Exception in thread “pool-4-thread-5” java.lang.OutOfMemoryError: Java heap space
at java.util.Arrays.copyOf(Arrays.java:2882)
at java.lang.AbstractStringBuilder.expandCapacity(AbstractStringBuilder.java:100)
at java.lang.AbstractStringBuilder.append(AbstractStringBuilder.java:390)
at java.lang.StringBuilder.append(StringBuilder.java:119)
at com.ephesoft.dcma.util.EphesoftStringUtil.concatenate(EphesoftStringUtil.java:194)
at com.ephesoft.dcma.core.threadpool.EphesoftProcessExecutor.executeProcess(EphesoftProcessExecutor.java:249)
at com.ephesoft.dcma.core.threadpool.EphesoftProcessExecutor.run(EphesoftProcessExecutor.java:186)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
Solution:
If you encounter the error above, you can try increasing the memory settings up to a maximum of 25% of your physical RAM memory. Or, increase your server RAM.
The defaults for a 8GB RAM server are below where 2048 is 25% of 8GB. Scale the numbers up appropriately for your server.
Configuring Tomcat (Application)
1. Edit startup.bat using a text editor.
2. Please find JAVA_OPTS in startup.bat and copy the settings against JAVA_OPTS to a new instance of text editor. ( in case we want to revert to earlier settings.)Figure: Which options are to be edited.

3. Now edit JAVA_OPTS by appending below mentioned settings to its end.
-Xms2048m –Xmx2048m –Xss512k -XX:MaxPermSize=1024m -XX:PermSize=1024m

Figure: JAVA_OPTS after editing.

4. Please make sure that we don’t have duplicate entries for above mentioned optioned in JAVA_OPTS.
5. Save startup.bat

Configuring Tomcat (Windows Service)

1. Open tomcat service configuration by double clicking EphesoftEnterprise.exe present inside java app server in bin folder.

Tomcat Service Configuration.
2. Go to Java tab.

Java Tab under tomcat configuration
3. Now append following configuration under Java Options:
-XX:MaxPermSize=1024m
-XX:PermSize=1024m

Please make sure none of above entries are duplicated in Java Options:

· Edit Initial memory pool option to value 2048.
· Edit Maximum memory pool option to value 2048.
· Thread Stack Size to 512

Apply these settings and start the server.

Was this article helpful to you?

Walter Lee

Comments are closed.