我在一个非常简单的客户端服务器配置中使用 Akka.Net。目前没有什么非常先进的。在来回发送消息大约 3 或 4 天后,整个系统似乎处于断开连接状态。随着服务的重新启动,一切都重新连接并且没有问题。在此之前,事情会断开连接,但它似乎会立即重新连接。
在此期间,两台机器都可以在网络上访问,并且似乎没有任何实际的连接问题。
我不知道从这里去哪里。
客户端配置(服务器非常相似)
return ConfigurationFactory
.ParseString(string.Format(@"
akka {{
loggers = [""XYZ.AkkaLogger, XYZ""]
actor {{
provider = ""Akka.Remote.RemoteActorRefProvider, Akka.Remote""
serializers {{
json = ""XYZ.AkkaSerializer, XYZ""
}}
}}
remote {{
helios.tcp {{
transport-class = ""Akka.Remote.Transport.Helios.HeliosTcpTransport, Akka.Remote""
applied-adapters = []
transport-protocol = tcp
port = 0
hostname = {0}
send-buffer-size = 512000b
receive-buffer-size = 512000b
maximum-frame-size = 1024000b
tcp-keepalive = on
}}
transport-failure-detector {{
heartbeat-interval = 60 s # default 4s
acceptable-heartbeat-pause = 20 s # default 10s
}}
}}
stdout-loglevel = DEBUG
loglevel = DEBUG
debug {{
receive = on
autoreceive = on
lifecycle = on
event-stream = on
unhandled = on
}}
}}
", Environment.MachineName));
这个循环一开始是非常零星的,但是过了一段时间它会重复,直到服务重置之前什么都没有连接。
WARN 2015-07-31 07:22:12,994 [1584] - Association with remote system akka.tcp://SystemName@Server:8081 has failed; address is now gated for 5000 ms. Reason is: [Disassociated]
ERROR 2015-07-31 07:22:12,994 [1584] - Disassociated
Akka.Remote.EndpointDisassociatedException: Disassociated
at Akka.Remote.EndpointWriter.PublishAndThrow(Exception reason, LogLevel level)
at Akka.Remote.EndpointWriter.Unhandled(Object message)
at Akka.Remote.EndpointWriter.Writing(Object message)
at Akka.Actor.ActorCell.<>c__DisplayClass3e.<Akka.Actor.IUntypedActorContext.Become>b__3d(Object m)
at Akka.Actor.ActorBase.AroundReceive(Receive receive, Object message)
at Akka.Actor.ActorCell.ReceiveMessage(Object message)
at Akka.Actor.ActorCell.AutoReceiveMessage(Envelope envelope)
at Akka.Actor.ActorCell.Invoke(Envelope envelope)
DEBUG 2015-07-31 07:22:12,996 [1494] - Disassociated [akka.tcp://SystemName@Client:57284] -> akka.tcp://SystemName@Server:8081
DEBUG 2015-07-31 07:23:13,033 [1469] - Drained buffer with maxWriteCount: 50, fullBackoffCount: 1,smallBackoffCount: 0, noBackoffCount: 0,adaptiveBackoff: 10000
ERROR 2015-07-31 07:24:13,019 [1601] - No response from remote. Handshake timed out or transport failure detector triggered.
DEBUG 2015-07-31 07:24:13,020 [1569] - Disassociated [akka.tcp://SystemName@Client:57284] -> akka.tcp://SystemName@Server:8081
WARN 2015-07-31 07:24:13,020 [1601] - Association with remote system akka.tcp://SystemName@Server:8081 has failed; address is now gated for 5000 ms. Reason is: [Disassociated]
ERROR 2015-07-31 07:24:13,021 [1601] - Disassociated