The blog discusses the Java VM Initialization error while running the Weblogic Server.
Error occurred during initialization of VM
Could not reserve enough space for object heap
The error is an JVM error and encountered when the Java Process cannot create the Virtual machine at run time due to limitations on the Heap Size for memory allocations. Heap Size is the memory allocation for storing java object at run time. The Heap Size values can be managed though Xmx and Xms VM arguments.
The below could be the reason for object heap error
- The heap size is not defined to be allocated for the memory
- Installed 32 bit JVM in 64 bit machine
- The provided heap size -Xmx value is defined too high than to be allocated as per 32- bit VM.
- The provided heap size -Xmx value is defined too less than to be allocated as per 32- bit VM.
- The provided heap size -Xmx value more than the available physical memory.
The heap size values will differ based on below configurations
- Operating system 32-bit machine or 64-bit machine.
- JVM 32/64 bit version
- hardware architecture
Identify the Current Heap Size
In case of Weblogic Server, the server start provides the Java Memory arguments for heap size
Modify the Java Heap Size memory arguments
Update the Java memory arguments by performing the below action
Linux:
-bash-3.2$ export _JAVA_MEMORY_OPTIONS =”-Xmx512M”
Windows:
Update the Windows Environment Variables
Updating Heap Size for Weblogic Server running SOA
In case the above error is coming while running weblogic server or the managed server like soa_server1 , then you can update the Heap Size Memory allocation in the Environment variable using USER_MEM_ARGS which overrides the value for MEM_ARGS in the setDomainEnv.cmd file of the weblogic domain.
Updating Heap Size from Weblogic Server Console
Perform the below given steps:
- Log into the weblogic server console
- Click on Servers
- Select the Server for which changes need to be done. (AdminServer)
- Click on Monitoring -> Performance Tab
- Update the Heap Size values.
Restart the Weblogic Server and memory issue should be resolved now.