Server’s send buffer full

The whole answer can be found below.

Please note: The Photon forum is closed permanently. After many dedicated years of service we have made the decision to retire our forum and switch to read-only: we've saved the best to last! And we offer you support through these channels:

Try Our
Documentation

Please check if you can find an answer in our extensive documentation on PUN.

Join Us
on Discord

Meet and talk to our staff and the entire Photon-Community via Discord.

Read More on
Stack Overflow

Find more information on Stack Overflow (for Circle members only).

Write Us
an E-Mail

Feel free to send your question directly to our developers.

Server’s send buffer full

Sueko
2014-03-31 07:49:17

Hi! I am using Exit Games Cloud system to host my games. I keep on receiving "OnConnectionFail" with "DisconnectByServerLogic" as the reason. When looking up the reason in the documentation, it says:

"DisconnectByServerLogic: Server actively disconnected this client. Possible cause: Server’s send buffer full (too much data for client)."

The issue is happening when a player connect an already started game, so I thought the problem was that too many buffered RPC where being sent at teh same time. But when prompting these RPCs, they just sum 27....

What am I doing wrong?

Comments

Tobias
2014-03-31 12:59:22

Despite being few, the RPCs could be really big and still fill the send buffer. Also, Instantiate calls are buffered and might fill the send buffer. It's pretty likely that the send buffer fills up when you have this issue only when you join the room. Can you check if you have a lot of buffered stuff that new players get? In worst case, you will have to optimize and minimize that info.

Sueko
2014-04-01 01:38:24

Thanks Tobias. How can I effiently and reliably check the amount of stuff I have buffered? At the moment I am just printing a message for every RPC called in order to count them. What is considered a lot of info? What is the maximum size of the buffer? Where can I find response to these type of questions? I checked the manual but did not find the proper answers. Thanks!

Tobias
2014-04-01 16:03:17

Problem is: There are no fixed values for "what is a lot". It depends so much on your target platform and network that we have a (really) hard time providing numbers. I will have to point a colleague from the server side to this thread to get you the buffer sizes.

You can show the message and byte counts with the PhotonStatsGui really easy. Just drag it in your project and check out the various options. A look at it's code will show how to access individual values.

[Deleted User]
2014-04-01 16:31:03

Hey,

as Tobias said, the calculation of buffer sizes is unfortunately very complex and we can not say "you are allowed to send X bytes per second". It depends on your network connection, on the speed at which your clients can receive & process (and acknowledge) the data etc. Sorry that I can not provide exact numbers to solve your problem here.

Check if you can reduce the amount of data that is buffered / sent when you join a room, and check if it all needs to be sent reliabe.

Back to top