Search Unity

  1. We are migrating the Unity Forums to Unity Discussions. On July 12, the Unity Forums will become read-only.

    Please, do not make any changes to your username or email addresses at id.unity.com during this transition time.

    It's still possible to reply to existing private message conversations during the migration, but any new replies you post will be missing after the main migration is complete. We'll do our best to migrate these messages in a follow-up step.

    On July 15, Unity Discussions will become read-only until July 18, when the new design and the migrated forum contents will go live.


    Read our full announcement for more information and let us know if you have any questions.

Question How to do memory profiling for Linux DGS when running in Multiplay?

Discussion in 'Game Server Hosting' started by unity_03BA514BAC145D0E9AB3, Mar 9, 2023.

  1. unity_03BA514BAC145D0E9AB3

    unity_03BA514BAC145D0E9AB3

    Joined:
    Feb 18, 2023
    Posts:
    9
    Hi, Can we connect memory profiler for Linux DGS running in Multiplay? I have a problems with memory leaks for my server but only happen in Linux build. I see memory usage increased with or without player joined, but it's strange because when I tested locally with Windows DGS build, there is no leaks, and profiler seems fine. I use Photon Fusion and Unity 2021.3.12f1.
     
    alexeyzakharov likes this.
  2. alexeyzakharov

    alexeyzakharov

    Joined:
    Jul 2, 2014
    Posts:
    508
    If you use development player, then you should be able to connect to the server by IP with the Memory Profiler.

    There should be no port blocking by default on the Multiplay side.
    Unity players listen on the
    55000 
    port by default and you can also specify is in the cmdline or BootConfig parameter as
    player-connection-listen-address
     
    MartinTilo likes this.
  3. qumoo

    qumoo

    Joined:
    Jul 16, 2020
    Posts:
    3
    Hi,

    I'm currently working on profiling for a Linux Dedicated Game Server (DGS) running in an Agones environment.

    I attempted to use the
    player-connection-listen-address
    option as a cli argument, like
    my_app -batchmode -nographics -player-connection-listen-address 12345
    (where 12345 is the port number I intend to use), expecting this to configure the server to listen on the specified address for player connections. Unfortunately, I haven't observed any indications that the server is actually listening on the intended port.

    Could anyone advise on the correct way to specify the port with a CLI argument?
     
  4. MartinTilo

    MartinTilo

    Unity Technologies

    Joined:
    Aug 16, 2017
    Posts:
    2,517
    How did you come to the conclusion that it isn't listening for those connections?
     
    Last edited: Feb 9, 2024
  5. qumoo

    qumoo

    Joined:
    Jul 16, 2020
    Posts:
    3
    Thank you for your reply. I concluded that the server isn't listening for those connections based on the following observations:
    • I am unable to connect using the Unity Profiler.
    • The specified port does not appear to be listening.
    Strangely, the profiling port is opened correctly only when the player-connection-listen-address is not specified. Here is an example to illustrate:

    As you can see, when I don't specify player-connection-listen-address, the application listens on the expected (default) port. However, specifying the option seems to prevent the expected port from listening.
     
  6. qumoo

    qumoo

    Joined:
    Jul 16, 2020
    Posts:
    3
    I've discovered the missing piece. The
    player-connection-listen-address
    option requires a value in the format
    address:port
    .
    Specifying it as
    -player-connection-listen-address 0.0.0.0:12345
    worked perfectly.

    Thank you!
     
    Last edited: Feb 14, 2024
    MartinTilo likes this.