Stream data limit?


I'm sending some data in OnPhotonSerializeView. A lot of data. Think hundreds of KBs per second. When that happens a client that receives that data at some point just gets kicked out of the room, with no info in console log why whatsoever. Is there some limit to the amount of data that can be sent in OnPhotonSerializeView?

All best


  • Hi @Wojtek,

    yes, there is a limit. If you get disconnected by the server, you will receive a DisconnectByServerLogic in the void OnFailedToConnectToPhoton(DisconnectCause cause) callback. I currently don't know the limit, but hundreds of KBs is way too much.
  • Even when I am hosting the server? This is a huge problem because from time to time we stream images and get kicked out of the room. Any solution to that?
  • edited December 2018
    i'd suggest you don't use the stream for "from time to time" actions. Get an RPC for that. Note though that you also have limitiations on there. But since you have to transform your image into an binary array anyways there should be no problem in simply cutting the array in pieces that fit into one rpc call and assebmle them again on the other side.
    Be carefull though not to send too large images or to include a delay between calling the rpcs for each image. Otherwise you might hit the msg/s limit on your server when spamming rpcs.

    Another thing that is pro rpc is that you can specifically define the receivers for each rpc without a big hassle.

    Hope this helps!
Sign In or Register to comment.