question

webmaster avatar image
webmaster asked

Can't access old server log

We have servers hosted with Playfab (B7F9) and when we tried to access a server log from yesterday, we get an not found error:

https://www.dropbox.com/s/4b7uww015t4vjnd/ServerArchive.png?dl=0

https://www.dropbox.com/s/fohdie3mq50s4l4/ServerArchive1.png?dl=0

Also when I tried to access the server log from the playerData, it just bumps me back to the player listing:

https://www.dropbox.com/s/4rc7e6leix5h6q3/PlayerServerLog1.png?dl=0

https://www.dropbox.com/s/tofya11c9wmjaf6/PlayerServerLog2.png?dl=0

That said, when I launch a new server, connect to it, then terminate that new server, I was able to get than new server's log.

Can you help me figure out what's going on? We really would like to be able to get that specific old server log due to an issue that we are trying to troubleshoot.

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

Regardless of which interface page you try to access the log from, it's pointing to the same location, so the thing to focus on is why we don't have a log file for your server execution time. When a server instance stops in our server hosting, we pull the log file. But that's dependent upon the log file being in the correct folder, and having the correct name (multiple instances can run on one machine, so each log file is named based upon the server's Lobby ID). Since you've had some servers run where you've been able to retrieve logs, I'm going to assume you're familiar with how to use the log_file_path part of the build configuration (for others, the details are in this tutorial: https://api.playfab.com/docs/tutorials/landing-tournaments/custom-game-servers). So if the file is written to the correct location, the possible ways we would be blocked from copying it from the server would be:

1. The server host was terminated. If the host machine is shut down, that kills all instances immediately, without providing us with the ability to copy off the files.

2. The file was locked by another process. If you're using multiple processes, and one other than the exe defined in the build configuration is holding the file open, that would prevent us from reading it.

3. The file is too large to be read in the time available. If you have long-running servers, and your log file is hundreds of megabytes (or more), it's possible we wouldn't have enough time to read it before the server is shut down.

2 comments
10 |1200

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

webmaster avatar image webmaster commented ·

Based on your descriptions, I think #3 is the reason. In our testing, the logs are sometimes downloadable, sometimes not, even when running instances on the same server & build.

Is there no way around this? Like API calls we can do to get the log archived as the server runs? We are currently running open beta tests, so we have a lot of extra logging going on to help us debug technical issues. These extra logging will be turned off once we go production, but are super useful at the moment.

thx!

0 Likes 0 ·
brendan avatar image brendan webmaster commented ·

Sure, you could, as part of your game server logic, write the log file to our CDN using the Content service, and then download it from there:

https://api.playfab.com/documentation/admin/method/GetContentUploadUrl

https://api.playfab.com/documentation/server/method/GetContentDownloadUrl

0 Likes 0 ·

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.