INvBhosale avatar image
INvBhosale asked INvBhosale commented

Not able to start Studio on Windows, getting "OutOfMemoryError: Java heap space"

Trying to run on Windows 10 with 32gb ram and keep getting below errors. Any solution?

Starting Studio. This may take a few minutes. You will be notified here when Studio is ready.
Looking for Java in path.
Java version located 1.8
Starting === Exception in thread "Thread-0" java.lang.OutOfMemoryError: Java heap space
        at java.util.Arrays.copyOfRange(Unknown Source)
        at java.lang.String.<init>(Unknown Source)
        at java.lang.String.substring(Unknown Source)
Uncaught error from thread []: Java heap space, shutting down JVM since 'akka.jvm-exit-on-fatal-error' is enabled for for ActorSystem[Studio]
java.lang.OutOfMemoryError: Java heap space
        at java.util.LinkedList.linkBefore(Unknown Source)
        at java.util.LinkedList.add(Unknown Source)
        at$$Lambda$142/23907272.accept(Unknown Source)
        at java.lang.Iterable.forEach(Unknown Source)
        at$$Lambda$141/8766067.accept(Unknown Source)
        at java.lang.Iterable.forEach(Unknown Source)
        at akka.serialization.Serialization$$anonfun$deserialize$1.apply(Serialization.scala:128)
        at scala.util.Try$.apply(Try.scala:192)
        at akka.serialization.Serialization.deserialize(Serialization.scala:122)
        at com.rbmhtechnology.eventuate.serializer.DelegatingPayloadSerializer.payload(PayloadSerializer.scala:72)
        at com.rbmhtechnology.eventuate.serializer.DurableEventSerializer.durableEvent(DelegatingDurableEventSerializer.scala:144)
        at com.rbmhtechnology.eventuate.serializer.DurableEventSerializer.fromBinary(DelegatingDurableEventSerializer.scala:78)
        at akka.serialization.Serialization$$anonfun$deserialize$3.apply(Serialization.scala:204)
        at scala.util.Try$.apply(Try.scala:192)
        at akka.serialization.Serialization.deserialize(Serialization.scala:204)
        at com.rbmhtechnology.eventuate.log.leveldb.LeveldbEventLog$EventIterator$$anonfun$5.apply(LeveldbEventLog.scala:235)
10 |1000

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

Erick Ramirez avatar image
Erick Ramirez answered

The stack trace you posted indicates the Studio JVM is running out of memory while loading one of your notebooks which has cells that contain a large result and are filling up the heap.

There are cell execution properties in configuration.yaml which should limit the size of the results:

# Maximum number of items returned per cell execution. Result set will be
# truncated to this number of rows, edges, vertices, etc.
# Default: 1000 items
resultSizeLimit: 1000

# Graph: maximum content length returned for a cell result (bytes).
# Default: 524288 bytes
maxResultSizeBytes: 524288

However, if you've imported a notebook from an older version of Studio, these limits would not have been applied.

You can workaround the issue by moving the .datastax_studio/ directory to another location then restart Studio. You can then try to import each notebook, one by one.

If this doesn't work and if you have any follow up questions, please log a ticket with DataStax Support so one of our engineers can assist you. Cheers!

10 |1000

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

djatnieks avatar image
djatnieks answered INvBhosale commented

Another option may be to increase the maximum amount of memory that can be used by Studio with the java Xmx option. The default maximum is OS dependent and may be less than expected - I have a 32Gb Mac and the default max java memory is 8Gb.

This can be set in the setenv.bat file in these lines:

rem Optional JVM arguments 

Thank you for providing a stack trace - a bug has been filed and will be addressed in an upcoming 6.8 patch release.

1 comment Share
10 |1000

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

INvBhosale avatar image INvBhosale commented ·

Sorry for delayed response as I was on paternity leave. I tried both the suggested options and no luck. Even downloaded newer version but still no luck. I think I will log a ticket and get help from engineer. Thanks for responding.

0 Likes 0 ·