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.
US-West Region for Custom Game Servers
RequestMultiplayerServer should return the BuildId used to instantiate the server.
Button to terminate a Server 2.0 server
Allow Server API / GetCurrentGame
Servers 2.0 Archived Servers should show timestamps
PlayFab Party for Linux (specifically Custom Game Servers)
Unreal Engine 4 Server 2.0 Example Project
Matchmaking minimum size of 1 player
A way to override title data from server API during experiments