Could not reserve enough space for object heap exception


This article explains the causes for this exception and suggests some solutions.



You may get this error when launching Talend Studio or running a Job. Sometimes, you want to allocate more memory to a Job execution by setting the -Xmx Java VM parameter, but the Job fails to run and throws the error.

Could not create the Java virtual machine.
Error occurred during initialization of VM.
Could not reserve enough space for object heap.


The result is that Talend Studio does not start or the Job does not run. The cause of this error is that the available memory is not sufficient for the maximum heap size set by -Xmx parameter.

The default JVM parameters are set in the ini configuration file, such as TOS_DI-win32-x86.ini:



-Xms sets the initial heap size and -Xmx sets the maximum heap size.


By default, the maximum heap size is set to 768m.



The maximum theoretical heap limit for the 32-bit or 64-bit JVM could be higher than the physical memory that the machine has. Due to various additional constraints such as available swap, kernel address space usage, memory fragmentation, and VM overhead, in practice the limit can be much lower. Especially 32-bit VM, on most modern 32-bit Windows systems the maximum heap size will range from 1.4G to 1.6G. On 32-bit Solaris kernels the address space is limited to 2G. On 64-bit operating systems running the 32-bit VM, the max heap size can be higher, approaching 4G on many Solaris systems. Hence, Talend suggests the following solutions for resolving this error.

  • Decrease the maximum heap size of -Xmx parameter.
  • Close other applications to release more memory.
  • Install Talend Studio on a 64-bit operating system, or move the job script to a 64-bit operating system to run, because the maximum heap limit for a 64-bit JVM can be much higher.
Version history
Revision #:
6 of 6
Last update:
‎02-26-2019 10:25 PM
Updated by:
Labels (2)