question

rob avatar image
rob asked

Missing logs

Hi,

I have an issue where sometimes my server does not get shut down automatically. By default when all players leave a room it should shut down and appear in archived games soon after. This happens the vast majority of the time but occasionally a game gets stuck open and appears to have players connected that I know are offline. I assume there's a bug in my code somewhere that's causing this but when I manually terminate the game from the active games dashboard and attempt to look at the log file I get a 'page not found' error.

Could the log file have got too big or something? These games typically stay open for several hours before I notice them. It's really hard to diagnose the problem without any more information to go on.

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

·
pfnathan avatar image
pfnathan answered

There are three possible reasons for a log not being available: (https://community.playfab.com/questions/15842/ue4-log-files-can.html)

1. (most common) It was written to the wrong directory. If you've got the configuration set up to use log_file_path appropriately though, that shouldn't be the issue.

2. The file isn't done the loading. If the server only just shut down, it's possible it's still being copied to S3.

3. The file was too large. We have noticed that files that are more than a couple hundred MB take long enough to copy to S3 that the server shutdown occurs before the copy is complete. How large are the log files?

3 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.

rob avatar image rob commented ·

I've come back to this issue because I'm still seeing it crop up every now and then. I believe in my case what is happening is that some error is triggering in my server instance which causes it to not only get stuck open but also to continually add to the logs so that by the time I notice it it's too late to recover the logs because the file has got too big. That's what I'm assuming anyway.

What do you suggest I do? Is there any way to recover those log files? Or perhaps I could limit them somehow? That might work, if I prevent logging after a certain point then I should at least be able to get the log file and hopefully track down the error from there.

0 Likes 0 ·
brendan avatar image brendan rob commented ·

Once the server has shut down, it's not possible to get the log files, as they're no longer available. Keeping track of how much you're writing to the log file would be your best bet - if you find that you're getting close to 100MB, just stop writing to it, so that you can get that info.

0 Likes 0 ·
rob avatar image rob brendan commented ·

Thanks, I'll do that.

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.