question

My Game Studio avatar image
My Game Studio asked

Logs - Custom Server

Hello,

I've been able to upload a build of my game server via the Builds tab, I've configured it to accept the command line arguments and set the games values you'd expect.

However I'd like to be able to review the console logs to ensure the server did not run into any errors - I'm writting a log file to the directory being passed to me during startup.


Cheeky second question - I'm running a persistent running game-server that continues to run even with zero players to keep the state alive.  How can I instruct PlayFab to start a instance? Using StartGame requires a playfabID to be passed along as instancing player and not shut it down (Or expect it to shutdown after player left as I believe thats when you gather log data).

Possible solution - Creating a 'server' user that is used to start and maintain the servers persistence? 



 

 

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
brendan avatar image
brendan answered

Log files (and output files) for server instances can be found in the Servers->Archived Games tab. There will be a link there for the log and output files for each server instance that has completed. The one exception is if you terminate the server host (on the Servers->Servers tab) - if the host is terminated, the logs cannot be obtained, as the instances are all killed by the host. If you need to terminate a server and need the log files, you should terminate them from the Servers->Active Games tab.

Concerning ongoing servers, the custom game server hosting in PlayFab is designed for session-based servers, which have a distinct "end state" (which is when the logs and output files are collected). While it is possible to have a server that runs for a very long time (days), our recommendation would be to "recycle" these servers every 24 hours or so, moving players to new server instances, so that logs can be collected, and to ensure that any issues that might accumulate (minor memory leaks in the custom game server code, etc.) don't become a problem.

It sounds like you may have some very specific requirements concerning your server, though. If there are particular reasons you feel this server model won't work for your title, you can email us at devrel@playfab.com with the details of your title, so that we can help to advise you based on your specific needs.

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.