Akka Cluster 'akka.jvm-exit-on-fatal-error' With 'java.lang.OutOfMemoryError: PermGen space'

4,732 views
Skip to first unread message

Puneet Jain

unread,
Jan 10, 2014, 9:01:41 PM1/10/14
to akka...@googlegroups.com
Hi,

I am using akka cluster for my application for communication between multiple jvm. I am using akka cluster with play framework. I have a cluster with 5 different JVM and they work fine at the start. After sometime the cluster gets broken with a exception:

[ERROR] [01/07/2014 23:58:43.870] [actorsystem-cluster-dispatcher-14] [akka://actorsystem/system/cluster/core/daemon] Cluster Node [akka://actorsystem@127.0.0.1:8081] - Marking node(s) as UNREACHABLE [Member(address = akka://actorsystem@127.0.0.1:8082, status = Up), Member(address = akka://actorsystem@127.0.0.1:8083, status = Up), Member(address = akka://actorsystem@127.0.0.1:8084, status = Up), Member(address = akka://actorsystem@127.0.0.1:8085, status = Up)]
Uncaught error from thread [actorsystem-cluster-dispatcher-14] shutting down JVM since 'akka.jvm-exit-on-fatal-error' is enabled for ActorSystem[actorsystem]
java.lang.OutOfMemoryError: PermGen space

I am not able to understand why this is happening.

Here is the environment I am using:
Java: 1.6
Play: 2.1.3
Akka: 2.1.4
Heap Size: default

Here is the configuration I am using for my application:

{
   "cluster-dispatcher":{
      "fork-join-executor":{
         "parallelism-min":2,
         "parallelism-max":4
      },
      "executor":"fork-join-executor",
      "type":"Dispatcher"
   },
   "akka":{
      "loglevel":"ERROR"
      },
      "cluster":{
         "auto-down":"on",
         "failure-detector":{
            "acceptable-heartbeat-pause":"10s",
            "threshold":15
         },
         "seed-nodes":[
            "akka://actorsys...@127.0.0.1:8081",
            "akka://actorsystem@127.0.0.1:8082",
            "akka://actorsystem@127.0.0.1:8083",
            "akka://actorsystem@127.0.0.1:8084",
            "akka://actorsystem@127.0.0.1:8085"
         ],
         "use-dispatcher":"cluster-dispatcher"
      },
      "remote":{
         "transport":"akka.remote.netty.NettyRemoteTransport",
         "netty":{
            "port":8081,
            "hostname":"127.0.0.1"
         },
         "log-remote-lifecycle-events":"on"
      },
      "actor":{
         "provider":"akka.cluster.ClusterActorRefProvider"
      }
   }
}

All the nodes have same configuration except the port they running. My release is stuck due to this issue. Please help me resolve this issue.

Thanks,
Puneet

√iktor Ҡlang

unread,
Jan 11, 2014, 5:26:17 AM1/11/14
to Akka User List

You will have to increase perm gen space for your jvm.

--
>>>>>>>>>> Read the docs: http://akka.io/docs/
>>>>>>>>>> Check the FAQ: http://akka.io/faq/
>>>>>>>>>> Search the archives: https://groups.google.com/group/akka-user
---
You received this message because you are subscribed to the Google Groups "Akka User List" group.
To unsubscribe from this group and stop receiving emails from it, send an email to akka-user+...@googlegroups.com.
To post to this group, send email to akka...@googlegroups.com.
Visit this group at http://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/groups/opt_out.

Puneet Jain

unread,
Jan 12, 2014, 2:22:37 AM1/12/14
to akka...@googlegroups.com
Hi,

I have 2GB Ram on my machine, All 5 process are running on the same machine. Please suggest me what should be the necessary size of PremGen for the akka cluster. With the respective configuration.

Thanks,
Puneet

Patrik Nordwall

unread,
Jan 12, 2014, 4:44:40 AM1/12/14
to akka...@googlegroups.com
Tuning is very application specific and it will be a challenge for you to fit 5 JVMs in 2 GB of RAM.

First thing you can try is -XX:MaxPermSize=128M

Regards,
Patrik
--

Patrik Nordwall
Typesafe Reactive apps on the JVM
Twitter: @patriknw

Puneet Jain

unread,
Jan 12, 2014, 9:33:58 PM1/12/14
to akka...@googlegroups.com
Thanks Viktor and Patrik, I'll try these item. Also I found some of the jvm option i.e. -XX:+CMSClassUnloadingEnabled -XX:+CMSPermGenSweepingEnabled. Let me see if they can also solve my problem.

Thanks,
Puneet


You received this message because you are subscribed to a topic in the Google Groups "Akka User List" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/akka-user/ZtC7j6l1zKE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to akka-user+...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages