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)
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.
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.