Client periodically disconnected

Hello

Here's my server structure. I have two lobby servers A and B, and a central server C. Users are randomly connected to different lobby servers.

The lobby server then established 200 connections to the central server through OutboundS2SPeer.ConnectTcp.

Users can set up a chat room. His request process is to send the request to the hall service, and then the hall service is forwarded to the center service. A room is created on the center suit. Then all users can join in.

The problem now is that we periodically receive ClientDisconect callbacks every 15 seconds. Could you help me analyze the problem?

Comments

  • hi, @ExitVip

    Your project structure is very different from what we have. so, I can not say much. Please check your code for different timers. Maybe you disconnect a peer after some time either because of timeout or because of exception

    best,
    ilya
  • Thank you for reply @chvetsov
    The crux of the problem is that I rarely see this problem when there is only one connection from my lobby server to the central server. When the number of connections from the lobby server to the central server is 200. The client will lose dozens of connections to the lobby server every 15 seconds and then the clients will reconect to the lobby
  • Hi @chvetsov mod
  • I need your help.
  • @Tobias @chvetsov Can you analyze the problem for me.
  • @Tobias @chvetsov Can you analyze the problem for me.
  • JohnTube
    JohnTube ✭✭✭✭✭
    Hi @ExitVip,

    Thank you for choosing Photon!

    I'm afraid we cannot help you since, as my colleague @chvetsov mentioned above (he's on vacation this week and will be back next week btw), you have modified the server code and made an application from scratch. We do not offer free support for this. We can just give you pointers or hints.
    We also cannot guess what the problem is.
    You need to narrow it down yourself.
  • Hello @JohnTube ,Thank you for your reply. I have three more questions. 

    1. I have a total of three servers, A, B, C. The client connects to A and B. A and B are connected to C. There will be data interaction between A, B, and C. Do I need three licenses to run them. I found out that I had only subscribed to a $175 Unlimited CCU license. And copied them to the bin64 directory. They're still working well. I don't know if it's going to have a bad effect. For example, you will limit the speed of the network, or the number of connections. 

    2. In addition, the documents on your website refer to "However, you should use only one connection between any two servers-keep the connection open and use that one connection to send all data through it.". Does this mean that there can only be one connection between servers. I now have 200 connections. Does this cause the client to disconnect from the server? Just like the problem I'm having right now. Or it can cause a delay in the response between the servers. I found that when there was only one connection between the servers, the client was rarely disconnected from the server. However, the processing of highly concurrent requests between servers is slow.So, I established 200 connections between servers to handle highly concurrent requests. I wonder if this is reasonable? 

    3. If I want your further support. How can I pay for it?
  • chvetsov
    chvetsov mod
    edited July 2019
    Hi, @ExitVip
    please write us to developers@photonengine.com to get answers for #1 and #3.

    EDT:
    #2. Usually, one connection is enough for S2S communication. Mostly we use one. Only in one case where we needed to simulate incoming client connections we used many connections

    As to your issue, from what I see I may guess that this is the classic scale issue. Everything works fine for a couple of clients and dies if we have more.

    Please analyze the amount of traffic you send. How often you send data. What will happen with the amount of traffic if you add new players

    best,
    ilya
  • Hi, @chvetsov
    Thank you for your reply. I'm trying to analyze the problem.

    Does sending too much data will cause the client to disconnect? Our server does send a lot of push data to the client by calling this method. peer.SendOperationResponse()
  • @ExitVip yes, it may happen

    Although sending operation responses is ok, it breaks some underlying ideas. Operation responses should be used as responses to operation requests. in such a way you may get an RPC. responses contain 'ReturnCode'.
    in your case, I would recommend to use Events. They are supposed to be sent if something happens on server end.

    best
    ilya
  • Thank you @chvetsov. I ll try it.