issues with packet lost QUEUE_SENT_WARNING

Hello,

I'm having disconnections when I simulate packet loss. First I got the QUEUE_SENT_WARNING then I got the TIMEOUT_DISCONNECT error. It seems that the packet that drops are queued to be resend which, with the current frequency of which I do my services calls does lead to the TIMEOUT_DISCONNECT error.

What should I do to get rid of this issue ?

Comments

  • Hi @benjaml.

    If reliable packets get lost due, then they are resent. If the connection is that bad that the same reliable packet can't successfully be transmitted without hitting the DisconnectTimeout (default: 10 seconds) or the SentCountAllowance (default: 5 repeats), then the connection is considered lost.

    That is the whole point of sending a message reliably!
    If you don't want a disconnect to happen when a certain message can't be transmitted, then don't send that message as 'reliable', but use the 'unreliable' option for that message.
  • My question was not the right one. Instead of getting rid of the whole disconnection from a reliable packet that cannot be send because of packet loss, I would like to know if I can do something to support a higher percent of packet loss before the diconnection. I know that the DisconnectionTimeout is present on the server and the client. Does the DisconnectTimeout and SentCountAllowance you talked earlier refers to the client ones or the server ?
  • Kaiserludi
    Kaiserludi admin
    edited January 2020
    Hi @benjaml.
    Does the DisconnectTimeout and SentCountAllowance you talked earlier refers to the client ones or the server ?
    Those two both refer to the Client.

    The server timeout value on default is 5-10seconds (yes, this is a range: the server won't disconnect a client because of a timeout before at least 5 seconds without any life-sign from the client have passed and it won't wait longer than 10 seconds, but the exact point in time within this time span is up to the server implementation code to decide based on the round trip time of that specific client (clients with better pings can disconnected after less time without a life-sign that clients with worse pings)).

    You can configure the server side timeout value in the servers config file if you self-host the server and you can ask us to do so for you for Photon Enterprise Cloud apps. On Photon Public and Premium Cloud apps the server side timeout can't be adjusted however.

    Note that it makes not much sense for you to increase the client side timeout without also increasing the server side one, as that only results in the server side timeout always kicking in before the client-side one.

    Hence for Photon Public and Premium Cloud apps it only makes sense to change the client side timeout, when you want to decrease it.
    I would like to know if I can do something to support a higher percent of packet loss before the diconnection.
    If it is fine for your messages that only 99.9999% of them arrive instead of 100%, then those messages don't need to be sent reliably and you should not send them with the reliable-flag set to 'true'. Unreliable messages can get lost without triggering a timeout.