Brent Batas (Lisk) suggested an idea · Jul 30, 2018 at 03:05 AM · Custom Game Servers
Due to a server bug, we have servers that start up, but remain in some "limbo" state where they are taking up server resources, but not actually allowing players to connect.
It would be very nice if we could turn on a feature that auto-terminated long-running servers. Our game sessions are about 25 minutes long on average, and max out around 35 minutes, so absolutely nothing should be running beyond an hour.
I would love to be able to automatically terminate servers after an hour.
Chad Franklin commented · Jun 05, 2020 at 09:33 AM
Any chance you've encountered a solution for this?
Brandon Phillips commented · Jun 05, 2020 at 09:52 AM
We terminate our sessions after a certain time limit. In Unity, what we do is:
void Update() { if (Time.timeSinceLevelLoad > maxTime) { Shutdown(); } }
@Chad Franklin Sure thing! Although, since this would be run every frame, you might want to instead do something like:
private bool didShutdown = false; void Update() { if (Time.timeSinceLevelLoad > maxTime && !didShutdown) { didShutdown = true; //your shutdown code here } }
Thanks again for pointing that out, probably just saved me a lot of trouble.
We would love to know what you need. Submit your ideas and upvote others to help us prioritize.
New server status called "Error" if your custom game server crashes with an error
Can Match/GetMatch API return the additional parameter 'FQDN'?
Expand "Matchmaker API" to include get/set Game Modes and get Builds. [QoL]
Please support TLS certs on your instances
S3 Archiving of Server Game Logs
Need datetime stamp on multiplayer server logs
US-West Region for Custom Game Servers
RequestMultiplayerServer should return the BuildId used to instantiate the server.