Back

JAVA HEAP SPACE ERROR

Ana Escalera, modified 2 Years ago.

JAVA HEAP SPACE ERROR

Youngling Posts: 17 Join Date: 9/13/16 Recent Posts
Dear Forum

Ive been trying to set up an spatial interpolation process but it gives me this error:

TaskRun.PartlyFailed: Workflow Preprocess with task run id 658' partly failed because activity 'Interpolate_P_day2' failed. (Plugin 'Interpolate_P_day2' failed, message was: 'Java heap space
ModuleConfigFiles/dataprep/Interpolate_P_day2.xml)


Please can you help me with this? ive searched on internet about this java error and it seems to be an out of memory error or something like that. Actually i know almost nothing on programming so this is hard for me to understand. Help please!
Arnejan van Loenen, modified 1 Year ago.

RE: JAVA HEAP SPACE ERROR

Padawan Posts: 70 Join Date: 5/29/12 Recent Posts
Hi Ana,

It is indeed a memory issue, but fortunately simple to solve! There are two options:
1) decrease the relative view period of the timeseries that you are processing. If you need to process a long timeserie, then you can divide the period in smaller periods
2) increase the allocated memory: this is set in the ini file in the bin-folder (or jpif file in older versions of Delft-FEWS). Best is to set it to 256, 512 or 1024 mb.

best regards!
Arnejan
CW
Chris Whitlow, modified 1 Year ago.

RE: JAVA HEAP SPACE ERROR

Youngling Posts: 1 Join Date: 2/26/17 Recent Posts
I have encountered the same issue as Ana which was not a surprise as I am analysing 17 years of 15 minute resolution historical data. The reply from Arnejan is useful but there are two ini files in the bin directory (DELFT-FEWS.ini and FEWSLauncher.ini, both of which have two memory allocation statements in them

vmarg.1=-Xms512m
vmarg.2=-Xmx1024m

in the DELFT-FEWS.ini file and

vmarg.1=-Xms256m
vmarg.2=-Xmx512m

in the FEWSLauncher.ini file

Should I double all 4 values?

Thanks for your help.

Chris
Arnejan van Loenen, modified 1 Year ago.

RE: JAVA HEAP SPACE ERROR

Padawan Posts: 70 Join Date: 5/29/12 Recent Posts
Hi Chris,

you should use the ini file that has the same name as the executable that you use to start your application, since these are linked to each other. I assume in your case it is Delft-FEWS.ini

best regards,
Arnejan
TC
tomi crow, modified 1 Year ago.

RE: JAVA HEAP SPACE ERROR

Youngling Posts: 1 Join Date: 5/10/17 Recent Posts
More Java Memory Management

There is no manual way of doing garbage collection in Java.
Java Heap is divided into three generation for the sake of garbage collection. These are the young generation, tenured or old generation, and Perm area.
New objects are created in the young generation and subsequently moved to the old generation.
String pool is created in Perm area of Heap, Garbage collection can occur in perm space but depends on upon JVM to JVM.
Minor garbage collection is used to move an object from Eden space to Survivor 1 and Survivor 2 space, and Major collection is used to move an object from young to tenured generation.
Whenever Major garbage collection occurs application, threads stops during that period which will reduce application’s performance and throughput.

More about.....Java Memory Management

Crow