"Send buffer full" on unreliable UDP traffic

Options
I have a Photon application, lets call it S1.

S1 generates an unreliable UDP message that is ~1400 bytes every 50ms, and gets sent to all connecting clients. I'm testing right now with 40 clients.

Doing this results in error message: "Disconnecting Peer=T:ClientPhotonPeer,ConnId:2,ip:34.217.214.13:63783: Send buffer full"

Using wireshark on my local machine as 1 of the clients, I see that the ~1400 bytes message is being fragmented into 2 packets, 1 of 1200 bytes and the other as the rest.

If I decrease the message size to <1200 bytes (i.e. lower that the configured MTU), this problem goes away.

Some questions
1) why this is happening only for fragmented packets? I generate this message every 50ms, which seems like enough time to send out both packets successfully

2) I wondered if the "DataSendingDelayMilliseconds" was causing some packets to build up. However, I set it to 0 and the problem persists. If I set "DataSendingDelay" to 0, does that translate to "send as soon as you get it"?

Comments

  • chvetsov
    Options
    Hi, @aowen
    We do not recommend to change parameters like 'DataSendingDelayMilliseconds', but yes, it will send it faster.

    Back to your issue. First of all the root cause of your issue is that unreliable packet is bigger than MTU(1200) and it was split into fragments. Fragments are sent reliably.

    in case you need to increase reliable messages throughput you may change the next three options:
    PerPeerMaxReliableDataInTransit
    PerPeerTransmitRateLimitKBSec
    MaxQueuedDataPerPeer

    But all they increase loading on clients. Also, you need to make sure that clients call Service method often enough to handle all this stuff

    best,
    ilya