[On Premises] Failed to Get Server Instance (Occasional) and BroadcastEvent Fail cases.

Hey, hi sorry about creating new discussion , as i was not getting reply on existing discussion i though i would make a new. I have few questions hope if someone could help answer them.

1: Hey while debugging using visual studio only 1 or 2 times i am able to create a room. Rest of the time ill get Failed to get Server instance error. How could i fix this? FYIs:

a: I'm using photon on premises server.
b: I'm running socket server using visual studio F5 command.
c: The clients are unity editors running on same machine.
d: In configuration files i have only added a plugin , all IP settings are default that is 0.0.0.0 which should do auto detection i guess.
e:Once i start getting that error ill keep getting it until i rebuild project and restart it (event that does not guarantee fix )
f: Server has no issue when deployed on remote server.

Hoping any one could share a config file for local development.

2: BroadcastEvent is triggered on server , but when on of the actor has disconnected the connected actor is unable to receive the event at all. Is there a way to debug this issue? Broadcast does not return success anything.. so i don't know if broad cast was successful.

Comments

  • Hi @para_nautilus,

    You should have waited a bit longer I saw your other comments and I was planning to reply.
    We want to avoid duplicate topics.
    But it's fine, no harm done :)
    Anyways,

    1. I think you are not waiting long enough for the server applications to finish starting and initialization.
    The Game Server did not finish registering itself to the Master Server probably, that's why the Master Server can't find any instance of Game Server. Or, unlikely, you are testing with too many peers that a single Game Server can't handle.

    2. You should have asked this separately. So you mean, a client did not get an event because it got disconnected before the event arrived, and when rejoined the room it didn't get it? Is that it? I think this is expected. You should add custom logic for acknowledging events reception from clients, e.g. using custom events just as acks OR server always caches events and client(s) remove event(s) from the cache as an ack.
  • 1.

    One more thing:
    Logging may add extra delay and make server slower, this is a warning disclaimer from the logging docs page:

    If you are running a local Photon Server and noticed a bad event rate then this is most likely caused by logging. For instance, we noticed that enabling both Photon Server logging and Windows Defender may cause the event rate to slow down considerably. That is why we recommend disabling all virus scanners and firewalls when enabling Photon logging so you can have the expected events rate. You can enable back the virus scanners and firewalls once you stop logging on Photon Servers.
  • Hey Jhon , Thanks for the reply.

    After hours of debugging i think i found the issue with occasional game server not being available.

    I was waiting for gameserver to register i put breakpoints where game servers are added to loadbalancer's available server list(From which it tries to get it and throws the error when it fails). but they immediately got removed on upcoming serverupdate events on loadbalancer.(Reason i am guessing is below).

    I think the loadbalancer is checking CPU usage and removing the game server from available server list.
    CPU is almost always near 100% since i'm running two unity editors which are running my game and 2-3 visual studio projects. - Let me know if this is could happen.

    On the second topic (Sorry for not separating this) , the broadcast event is not receiving on the actor who was still in room (Game is 2 player game). But this too works on deployment not while debugging ,May be logging might not be issue but i waited long enough. Since this is working on deployment (its just curiosity now)



  • I think the loadbalancer is checking CPU usage and removing the game server from available server list.
    CPU is almost always near 100% since i'm running two unity editors which are running my game and 2-3 visual studio projects. - Let me know if this is could happen.


    yes, this is the reason for removal

    About the second issue: It is difficult to say anything. I assume that your second player also might be disconnected by timeout that is why he does not get message

    best,
    ilya
  • Thanks for the confirmation, could you tell me a safe way to ignore the CPU usage? Adjusting weights something like that?
  • chvetsovchvetsov mod
    edited March 25
    There is Workload.config file. You can update in next way:
    instead <add Level="Highest" Value="90"/>
    add <add Level="Highest" Value="110"/>

    in such a way it will never reach 'Highest' level

    best,
    ilya
  • <3 Thanks
Sign In or Register to comment.