Data receiving actor goes to Terminated state due to possible cause: channel flooding

Hi!

Akka version.
1.4.27 or 1.4.45.

Environment.

  • .NET.
  • Wi-Fi connection, local network.
  • There are two remote actors. One of them sends data buffers to the other via IActorRef.Tell:
foreach (Message msg in Message.Split(parameters))
{
  messagesConsumer.Tell(msg);
}

Problem.
The connection between actors is lost – the receiving one goes to the Terminated state. The sender has time to send about 23000 messages (on average). While the recipient has time to process about 820 messages (on average).

Bad solution.
Add Thread.Sleep(50) before foreach:

Thread.Sleep(50);
foreach (Message msg in Message.Split(parameters))
{
  messagesConsumer.Tell(msg);
}

Question.
How to solve this problem correctly? Is it a channel flooding problem?
The recipient processes messages one at a time (no more than one message in his queue), while the sender sends thousands of messages. Why does this happen?

Another attempts.
I tried changing Akka-configuration, but it didn’t help:

enforce-ip-family = true
dns-use-ipv6 = false
tcp-nodelay = off
io.tcp.direct-buffer-pool.buffer-pool-limit = 102400
io.tcp.direct-buffer-pool-pool-limit = 100000
actor.inbox.inbox-size = 10000
actor.inbox.default-timeout = 30s

NOTE!
The same program logic works successfully if two actors are on the same machine. That is, messages between actors are not transmitted via Wi-Fi.

Hi @artyom_bs , Akkadotnet is a completely separate project from Akka. I recommend that you try asking in their forum instead: akkadotnet/akka.net · Discussions · GitHub

2 Likes