SNAP error : Java heap space

Hello,

I am not able to treat images anymore since 14th of march 2018. There is a message error saying “java.lang.outofmemoryerror : java heap space”.

I tried again with older images and everything works well. How can we get through this? Did something change with images since this date?

Thank you for your help.

1 Like

“out of memory error” indicates that you don’t have enough RAM to compute it. However, it is strange that it worked with image before that date.

The handling of the noise vectors in the new products uses more memory than with the older products. We will be looking at possibilities to reduce memory usage but it’s uncertain if it can be reduced.

Thank you for your answer. Can you tell me the size needed for the new products? I already tried to give more space to java when I had the first message error but it didn’t work.

Hi, What might be the possible solution for this problem?
I am also processing data of 2018 July, but am also getting JAVA HEAP Error.
I also processed 2015 data, and it was working just fine.

P.s
I have 8 Gb of memory

your computer cannot provide enough memory (RAM) to process it.

Thank you for the timely reply,
I am ready to upgrade my system according the latest need of Sentinel data.
How much memory do you suggest should I have!

@obarrilero should be able to provide guidelines.

Hi @khanwaleed247,

if you are working with S1 data, I think that this topic will be useful for you:

So I tested the S1 2018/08 data with 16Gb Ram, and am getting the following error.

org.esa.snap.core.gpf.OperatorException: Java heap space
at org.esa.s1tbx.calibration.gpf.Sentinel1RemoveThermalNoiseOp.computeTile(Sentinel1RemoveThermalNoiseOp.java:635)
at org.esa.snap.core.gpf.internal.OperatorImage.computeRect(OperatorImage.java:80)
at javax.media.jai.SourcelessOpImage.computeTile(SourcelessOpImage.java:137)
at com.sun.media.jai.util.SunTileScheduler.scheduleTile(SunTileScheduler.java:904)
Caused: org.esa.snap.core.gpf.OperatorException: Java heap space
at org.esa.snap.core.gpf.internal.OperatorExecutor$GPFImagingListener.errorOccurred(OperatorExecutor.java:376)
at com.sun.media.jai.util.SunTileScheduler.sendExceptionToListener(SunTileScheduler.java:1646)
at com.sun.media.jai.util.SunTileScheduler.scheduleTile(SunTileScheduler.java:921)
at javax.media.jai.OpImage.getTile(OpImage.java:1129)
at javax.media.jai.PlanarImage.getData(PlanarImage.java:2085)
at com.bc.ceres.glevel.MultiLevelImage.getData(MultiLevelImage.java:64)
at org.esa.snap.core.gpf.internal.OperatorContext.getSourceTile(OperatorContext.java:407)
at org.esa.snap.core.gpf.internal.OperatorContext.getSourceTile(OperatorContext.java:393)
at org.esa.snap.core.gpf.internal.OperatorImage.computeRect(OperatorImage.java:73)
at javax.media.jai.SourcelessOpImage.computeTile(SourcelessOpImage.java:137)
at com.sun.media.jai.util.SunTileScheduler.scheduleTile(SunTileScheduler.java:904)
at javax.media.jai.OpImage.getTile(OpImage.java:1129)
at com.sun.media.jai.util.RequestJob.compute(SunTileScheduler.java:247)
[catch] at com.sun.media.jai.util.WorkerThread.run(SunTileScheduler.java:468)

1 Like

I have the same problem, any solution?

There are many causes for. “Error: Java heap space”. When reporting a problem you need to provide enough detail to allow others to reproduce the problem. Before reporting, it is a good idea to see if any previous solutions work for you. You will find that many reports are for systems with 8GB RAM, which is only enough for small examples such as those used in tutorials and workshops. 16GB is the practical minimum; 32 or more is needed for some workflows. You should familiarize yourself with the tools to monitor memory usage for you OS, as even systems with ample RAM can give this error if other processes are using lots of RAM.

2 Likes