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! Your search result can be found below. Plus, we offer support via these channels:

Try Our

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

Join Us
on Discord

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

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.

peer being disconnected, Send buffer full

2012-04-03 18:34:50

Hi there,

Right now I am never explicitly calling "sendoutgoingcommands". i do call service on the client side ever 2 frames or so. I am getting this message in the server log and I have read some other threads on similar topics. It seems that I need to call SendOutgoingCommands but I was wondering what the cleanest approach to do this is?. Right now there are a few requesthandlers that fire events to clients inside a loop, obviously if the loop is big or the number of clients is big this will run into troubles. is there anykind of counter I can use and should a SendOutgoingCommands be followed by a thread sleep for instance.

Thanks, Dan


2012-04-11 12:09:53

You mix up client versus server error messages and solutions.

Calling Service() includes a call to SendOutgoingCommands(), as described in the doc.

The "SendBufferFull" problem is server-side: You try to send more to a client, than currently allowed. This fills the buffers and once that happens, the default logic will disconnect the client.

You should do the following:

  • Think about why you send so much.
  • If you are sure your client needs the data and can cope with it, check the server config.

The server config has some default values to limit bandwidth to the client. These limits maybe don't fit your usecase. You can open and edit PhotonServer.config. The server SDKs doc/photon-configuration.pdf will explain the settings some more.

2012-05-19 03:08:00

Hi, Still struggling with this sendbuffer is full issue. I have a loop and inside this loop I send events, sometimes the loop can be like 5000 or so. If inside this loop i add a counter and every 20 events sent i do a thread.sleep would that help?

Alternatively i looked at the pdf you referenced but a little lost in terms of which sendbuffer value to change. Could you point them out?

2012-05-19 03:12:50

ok so doing a thread.sleep(500) does seem to help and now even the 5000 event calls run pretty smoothly. Would still like to know how to increase the client send buffer though..

2012-05-21 12:29:43

Again: You mix up client and server stuff. SendBufferFull is a server-side problem, which you can't fix with increased client send buffer. A Sleep(500) is a workaround but will block a thread in the machine you're using it on. It doesn't seem a lot but for a server CPU, 500 milliseconds are ages.

What causes you to send 5k events so suddenly?

Back to top