CUDPSocketServer::OnError.Client disconnected by server randomly

Options
Hello,We use PUN and self-Hosted Server for my game.But the client disconnected randomly.I get an error "CUDPSocketServer::OnError() - CUDPSocketServer::OnSendToCompletionError(): 在一个非套接字上尝试了一个操作。".This is error message i think.I translate it and maybe is"CUDPSocketServer::OnError() - CUDPSocketServer::OnSendToCompletionError(): On a non socket to try an operation."
This happened often when 8 client connected.
This is the log for Photon-LoadBalancing.Thanks.
6696: 14:13:48.202 - TCP inactivity timeout: 10000ms
6696: 14:13:48.202 - MaxInboundMessageSize: 512000
6696: 14:13:48.202 - MaxOutboundMessageSize: 512000
6696: 14:13:48.202 - Forcing all applications ids to: "Game"
6696: 14:13:48.202 - Will accept ANY sub-protocols from the client
6696: 14:13:48.202 - No automatic WebSocket ping
6696: 14:13:48.202 - Adding Policy File listener on: 0.0.0.0: 843 with a listen backlog of: 150 and serving Policy File: "C:\Users\Administrator\Desktop\deploy\Policy\assets\socket-policy.xml"
6696: 14:13:48.202 - TCP inactivity timeout: 1000ms
6696: 14:13:48.202 - Adding Policy File listener on: 0.0.0.0: 943 with a listen backlog of: 150 and serving Policy File: "C:\Users\Administrator\Desktop\deploy\Policy\assets\socket-policy-silverlight.xml"
6696: 14:13:48.202 - TCP inactivity timeout: 1000ms
6696: 14:13:48.282 - Service is running...
6696: 14:21:06.959 - Service is stopped...
6696: 14:21:06.959 - Server shutting down...
6696: 14:21:06.959 - Shutdown monitoring enabled, 30000ms before process abort
6696: 14:21:06.959 - Notifying CLR applications of shutdown...
6696: 14:21:06.959 - RequestApplicationStop: 4
6696: 14:21:07.128 - RequestApplicationStop: 3
6696: 14:21:07.164 - RequestApplicationStop: 2
6696: 14:21:07.203 - RequestStop: defalt app domain
6696: 14:21:07.211 - Shutting down WebSocket Outbound Connection Manager...
6696: 14:21:07.211 - Shutting down TCP Outbound Connection Manager...
6696: 14:21:07.211 - Shutting down ENet Outbound Connection Manager...
6696: 14:21:07.211 - Disconnecting all outbound peers...
6696: 14:21:07.211 - Shutting down ENet host...
6696: 14:21:07.211 - Disconnecting all peers...
6696: 14:21:07.211 - CUDPSocketServer::OnError() - CUDPSocketServer::OnSendToCompletionError(): 在一个非套接字上尝试了一个操作。
6696: 14:21:07.212 - CUDPSocketServer::OnError() - CUDPSocketServer::OnSendToCompletionError(): 在一个非套接字上尝试了一个操作。
6696: 14:21:07.212 - CUDPSocketServer::OnError() - CUDPSocketServer::OnSendToCompletionError(): 在一个非套接字上尝试了一个操作。
6696: 14:21:07.212 - 3 disconnected
6696: 14:21:07.212 - Shutting down socket servers...
6696: 14:21:07.212 - Shutting down ENet thread pool...
6696: 14:21:07.214 - Shutting down TCP inactivity timers...
6696: 14:21:07.217 - ENet Host - Resetting all peers...
6696: 14:21:07.220 - WaitingForShutdownToComplete: NativePolicy:0.0.0.0:843
6696: 14:21:07.220 - OnShutdownCompleted: NativePolicy:0.0.0.0:843
6696: 14:21:07.220 - WaitingForShutdownToComplete: NativePolicy:0.0.0.0:943
6696: 14:21:07.220 - OnShutdownCompleted: NativePolicy:0.0.0.0:943
6696: 14:21:07.220 - WaitingForShutdownToComplete: TCP:0.0.0.0:4520
6696: 14:21:07.220 - OnShutdownCompleted: TCP:0.0.0.0:4520
6696: 14:21:07.221 - WaitingForShutdownToComplete: TCP:0.0.0.0:4530
6696: 14:21:07.221 - OnShutdownCompleted: TCP:0.0.0.0:4530
6696: 14:21:07.221 - WaitingForShutdownToComplete: TCP:0.0.0.0:4531
6696: 14:21:07.221 - OnShutdownCompleted: TCP:0.0.0.0:4531
6696: 14:21:07.221 - WaitingForShutdownToComplete: UDP:127.0.0.1:5055
6696: 14:21:07.221 - OnShutdownCompleted: UDP:127.0.0.1:5055
6696: 14:21:07.221 - WaitingForShutdownToComplete: UDP:127.0.0.1:5056
6696: 14:21:07.221 - OnShutdownCompleted: UDP:127.0.0.1:5056
6696: 14:21:07.221 - WaitingForShutdownToComplete: UDP:192.168.0.104:5055
6696: 14:21:07.221 - OnShutdownCompleted: UDP:192.168.0.104:5055
6696: 14:21:07.221 - WaitingForShutdownToComplete: UDP:192.168.0.104:5056
6696: 14:21:07.221 - OnShutdownCompleted: UDP:192.168.0.104:5056
6696: 14:21:07.221 - WaitingForShutdownToComplete: WebSocket:0.0.0.0:9090
6696: 14:21:07.221 - OnShutdownCompleted: WebSocket:0.0.0.0:9090
6696: 14:21:07.221 - WaitingForShutdownToComplete: WebSocket:0.0.0.0:9091
6696: 14:21:07.221 - OnShutdownCompleted: WebSocket:0.0.0.0:9091
6696: 14:21:07.221 - Shutting down CLR applications...

Comments

  • chvetsov
    Options
    hi, @felix_luo

    in log you provided we see such messages during server shutdown. That means that a reason for disconnects is something else. please check deploy/log folder

    best,
    ilya
  • felix_luo
    Options
    Hi,
    I check the log file.It shows the messages.
    Pls check it.
    Thanks a lot. :)
    2020-07-21 09:26:36,578 [1] INFO Photon.Common.LoadBalancer.ServerStateManager - Watching for application state file in C:\Users\Administrator\Desktop\deploy\ServerState.txt
    2020-07-21 09:26:36,596 [1] INFO Photon.Common.LoadBalancer.ServerStateManager - Server state is set to online
    2020-07-21 09:26:36,603 [1] INFO Photon.LoadBalancing.GameServer.GameApplication - Initializing master server connection ...
    2020-07-21 09:26:36,747 [1] INFO Photon.LoadBalancing.GameServer.MasterServerConnectionBase - Connecting to master at 127.0.0.1:4520, serverId=b5f86a83-f7ee-4124-8505-2a37297fe3c2
    2020-07-21 09:26:36,948 [1] INFO Photon.SocketServer.ApplicationBase - Application start: AppId=Game; AppPath=C:\Users\Administrator\Desktop\deploy\LoadBalancing\GameServer, Type=Photon.LoadBalancing.GameServer.GameApplication
    2020-07-21 09:26:37,013 [1] INFO Photon.SocketServer.Diagnostics.CounterPublisher - CounterPublisher started publishing ExitGames.Diagnostics.Monitoring.CounterSamplePublisher to ExitGames.Diagnostics.Monitoring.CounterSampleSender
    2020-07-21 09:26:37,776 [6] INFO Photon.Common.LoadBalancer.LoadShedding.FeedbackController - Transit CpuUsage from Lowest to Low with input 43
    2020-07-21 09:26:37,780 [6] INFO Photon.Common.LoadBalancer.LoadShedding.WorkloadController - FeedbackLevel changed: old=Lowest, new=Low
    2020-07-21 09:26:41,110 [9] INFO Photon.Common.LoadBalancer.LoadShedding.FeedbackController - Transit CpuUsage from Low to Normal with input 53
    2020-07-21 09:26:41,112 [9] INFO Photon.Common.LoadBalancer.LoadShedding.WorkloadController - FeedbackLevel changed: old=Low, new=Normal
    2020-07-21 09:26:42,213 [12] INFO Photon.LoadBalancing.GameServer.MasterServerConnectionBase - Master connection established: address:127.0.0.1
    2020-07-21 09:26:42,217 [12] INFO Photon.Common.LoadBalancer.ServerStateManager - Server state is set to online
    2020-07-21 09:26:42,247 [13] INFO Photon.LoadBalancing.GameServer.OutgoingMasterServerPeer - Registering game server with address 192.168.0.104, TCP 4531, UDP 5056, WebSocket 9091, Secure WebSocket 19091, HTTP 80, ServerID b5f86a83-f7ee-4124-8505-2a37297fe3c2, Hostname localhost, IPv6Address
    2020-07-21 09:26:42,598 [13] INFO Photon.LoadBalancing.GameServer.OutgoingMasterServerPeer - Successfully registered at master server: serverId=b5f86a83-f7ee-4124-8505-2a37297fe3c2
    2020-07-21 09:27:09,129 [12] INFO Photon.Common.LoadBalancer.LoadShedding.FeedbackController - Transit CpuUsage from Normal to Low with input 35
    2020-07-21 09:27:09,193 [12] INFO Photon.Common.LoadBalancer.LoadShedding.WorkloadController - FeedbackLevel changed: old=Normal, new=Low
    2020-07-21 09:28:23,148 [15] INFO Photon.Common.LoadBalancer.LoadShedding.FeedbackController - Transit CpuUsage from Low to Lowest with input 20
    2020-07-21 09:28:23,150 [15] INFO Photon.Common.LoadBalancer.LoadShedding.WorkloadController - FeedbackLevel changed: old=Low, new=Lowest
    2020-07-21 09:53:45,276 [1] INFO Photon.LoadBalancing.GameServer.GameApplication - OnStopRequested: serverid=b5f86a83-f7ee-4124-8505-2a37297fe3c2
    2020-07-21 09:53:45,320 [1] INFO Photon.SocketServer.ApplicationBase - Application is stopping: AppId=Game
    2020-07-21 09:53:45,356 [37] INFO Photon.LoadBalancing.GameServer.OutgoingMasterServerPeer - connection to master closed (id=2, reason=ManagedDisconnect, detail=), serverId=b5f86a83-f7ee-4124-8505-2a37297fe3c2
    2020-07-21 09:53:45,395 [1] INFO Photon.LoadBalancing.GameServer.GameApplication - TearDown: serverId=b5f86a83-f7ee-4124-8505-2a37297fe3c2
    2020-07-21 09:53:45,400 [1] INFO Photon.SocketServer.ApplicationBase - Application stop: AppId=Game
  • chvetsov
    Options
    hi, @felix_luo no, nothing here.

    I assume that your failures are related to send buffer full errors. they happen when player can not handle incoming flow of data. in your case you have 8 clients, so it might be a reason. Try to switch some parts to unreliable delivering


    best,
    ilya
  • felix_luo
    Options
    I check the parameter Observe option is "Unreliable On Change" on Photon View.So I think maybe is not the reason.My Game Logic is Calling photonView.Controller.SetCustomProperties every frame update.Is this the reason?So this operation cause traffic?

    Best Regards,
    felix_luo
  • chvetsov
    Options
    I'm not sure what is going on under the hood. let me invite @JohnTube here to answer

    best,
    ilya
  • JohnTube
    JohnTube ✭✭✭✭✭
    Options
    Hi @felix_luo,

    Thank you for choosing Photon!
    My Game Logic is Calling photonView.Controller.SetCustomProperties every frame update.Is this the reason?So this operation cause traffic?
    Yes, please do not do that. This is not how it's supposed to be used, properties are meant to be updated less frequently. Use RaiseEvent for that unreliably and even, so...
    Read more here.
  • felix_luo
    Options
    JohnTube wrote: »
    Hi @felix_luo,

    Thank you for choosing Photon!
    My Game Logic is Calling photonView.Controller.SetCustomProperties every frame update.Is this the reason?So this operation cause traffic?
    Yes, please do not do that. This is not how it's supposed to be used, properties are meant to be updated less frequently. Use RaiseEvent for that unreliably and even, so...
    Read more here.

    Got it.I will try it.
    Thanks. :#