These are chat archives for akkadotnet/akka.net

5th
Apr 2018
Jesse Connor
@jesseconnr
Apr 05 2018 02:51

I have an aggregator that accepts messages from a remote actor service. I built it because sending all of the data at once was just too large of a message. However, now that it's getting a few thousand messages I'm seeing errors like this.
Akka.Remote.Transport.AkkaProtocolException: Error while decoding incoming Akka PDU of length 28564 ---> Akka.Remote.Transport.PduCodecException: Decoding PDU failed

DotNetty.Codecs.TooLongFrameException: Adjusted frame length exceeds 128000: 128061958 - discarded

I'm on Akka 1.3.2, haven't tried upgrading yet, but even so I didn't see anything that stood out in the release notes that would indicate it's a bug. Anyone ever see anything like this when sending large amounts of messages? At the lower end, if I'm just sending a few hundred I don't get this error.
Jesse Connor
@jesseconnr
Apr 05 2018 03:49
Seems to happen after a few hundred messages, but randomly. If I reverse the order or sort the list of messages sent over the wire in various way it doesn't have an affect on where the error occurs.
Marc Piechura
@marcpiechura
Apr 05 2018 05:37
@jesseconnr looks like the same as this issue akkadotnet/akka.net#3327
Jesse Connor
@jesseconnr
Apr 05 2018 13:50
Perhaps, but I believe before I upgraded I was on DotNetty 0.4.6. Also, upgrading didn't fix it and the first message it fails on is only 28kb, same size every time. The error that follows claims there's a 128MB frame, but I have no idea how or where that would come from. The entire database that holds the messages I'm sending isn't even that large.
nathvi
@nathvi
Apr 05 2018 15:16
I'm wondering why Akka.Net decided to be dependent on DotNetty? It seems really immature and untested.
nathvi
@nathvi
Apr 05 2018 15:48
Does Akka.Net provide Exactly-Once Semantics?
nathvi
@nathvi
Apr 05 2018 18:21
Nvm, I just saw @Aaronontheweb 's video on making message buffers to deal with that problem.
nathvi
@nathvi
Apr 05 2018 18:38
So I have the following pattern. Please let me know if it makes sense. I have a TeacherActor and a TeachersAssistentActor. The TeacherActor creates the TeachersAssistentActor as a child. Whenever the TeacherActor receives a message of type "BoringWorkMessage", it forwards it onto the TeachersAssistent. When the TeachersAssistent gets the BoringWorkMessage, there is a certain probability that the work is too boring, and the TeachersAssistent commits suicide by throwing an exception. The teacher can restart the TeachersAssistent via a SupervisorStragegy
Jesse Connor
@jesseconnr
Apr 05 2018 20:34
@nathvi sounds correct to me, I do the same setup, just with different naming, OrderRouter starts all OrderActors and when they die for whatever reason it starts them back up. You may want to read up on the PreStart, PreRestart and PostRestart events that affect that behavior as well.
Ex. by default if the TeacherActor decides the work is so boring that it decides to commit suicide even before forwarding the message to an assistant, the PreRestart event will restart all children.
nathvi
@nathvi
Apr 05 2018 20:54
@jesseconnr , generally you want to push dangerous work to children, correct?