ERROR java.lang.OutOfMemoryError: Java heap space

We are experiencing this error with an EDA-LibSync process. What is the maximum heap size available and can it be based on a percentage of memory like 75%
 INFO  Library Synchronization initiated

INFO  Batch update support is on

INFO  Connected to Database using the following connection information:

                Connection String : LibSync

                User : xxxx

INFO  Connected to PLM using the following connection

information:

                Host : 

                User : 

INFO  Now synchronizing PLM type PWA Part

INFO  Now querying PLM…

INFO  Synchronization summary:

ERRORS: 0 WARNINGS: 0

 

INFO  Synchronization complete
INFO  Email notification has been sent successfully
ERROR Exception in thread “Timer-0”

 

ERROR java.lang.OutOfMemoryError: Java heap space

[ERROR      at

org.apache.axis.utils.ByteArrayOutputStream.needNewBuffer(ByteArrayOutputStr

eam.java:101)

Agile Angel Asked on October 26, 2017 in IT and Networking.
Add Comment
2 Answer(s)

what is your java version? depending on java version I can suggest you the script changes that you may need to run high volumes in libsync.

 

 

After multiple issues faced by perception software, at the search engine company we wrote our own lib sync which allowed us to customize the data when needed.

Agile User Answered on December 3, 2020.
Add Comment

Hi, you can increase the heap memory for your  program. If the sync is running in .sh or .bat process you can add -xmx.

java -xmx1024m <your program/class file name>.

By default heap size will be 1/4th of your physical memory.

In 32 bit JVM and OS, you can increase up to 75%.

In 64 bit JVM and OS, there is no limit you can increase more than the physical memory. But system will thrash, if you increase more than the physical memory.

It is highly recommended to utilize upto 75% for heap memory, since JVM will utilize some memory for permgen. And other services and program also utilize some memory from OS.

Based on your OS, physical memory, JVM, you can adjust the heap size to run program.

Agile Angel Answered on December 6, 2017.
Add Comment

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.