Currently, I have my custom game server coded so that an instance exits when a match ends (victory/defeat) or all players leave the game or 60 minutes have elapsed (games should only take about 40 minutes max, so 60 is a safe upper bound).
However, in certain circumstances (such as server dropping someone's connection or erroring, I think), the server doesn't exit. I know this because I've observed some servers that have been running for 6+ hours.
Is it possible to configure the Game Wrangler or pass in some kind of command line argument that ensures that the server instance shuts down after, say, 1 hour after it is started?
Answer by Brendan · Apr 14, 2017 at 04:15 PM
Not currently - the way the system works for custom game servers is that instances only terminate if the executable exits or you use the terminate option in the Game Manager.
Hello @Brendan, I have the same concern, and is this still the case? No way to ensure the container is closed after a period of time?
We do not forcibly shut down your executable currently. The hosted servers will continue to be available until the game server code exits (whether a normal exit or a crash), at which point they are reclaimed. For others, there's a Feature Request on this topic here if you want to up-vote (Like) it: https://community.playfab.com/idea/21647/automatically-shutdown-a-server-after-x-amount-of.html
Answer by Montana Tuska · Apr 14, 2017 at 05:18 PM
Why not just add in your own timer to kill the server after an hour?
Allowing User to Save Images/Audio/Video File on Playfab 1 Answer
SSH or RDP into Linux-based Container? 1 Answer
Is having a a "dummy" region selection rule the best practice if we use a single region? 1 Answer
Help with Server Architecture 2 Answers
Application.Quit isn't changing server from active to the standby ?. 0 Answers