Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

"max allowed size 128000 bytes, actual size of encoded class scala" error in akka remoting

I want to use Akka Remoting to exchange message over network between actors, but for large String message i got the following error:

akka.remote.OversizedPayloadException: Discarding oversized payload 
sent to Actor :: max allowed size 128000 bytes
, actual size of encoded class scala.

How can i fix this limitation?

like image 212
Saeed Zarinfam Avatar asked Apr 18 '16 04:04

Saeed Zarinfam


1 Answers

I add the following configuration and now everything is ok:

akka {

  actor {
    provider = "akka.remote.RemoteActorRefProvider"
  }

  remote {
    maximum-payload-bytes = 30000000 bytes
    netty.tcp {
      hostname = "127.0.0.1"
      port = 2552
      message-frame-size =  30000000b
      send-buffer-size =  30000000b
      receive-buffer-size =  30000000b
      maximum-frame-size = 30000000b
    }
  }
}
like image 158
Saeed Zarinfam Avatar answered Oct 15 '22 19:10

Saeed Zarinfam