Microsoft Azure PlayFab logo
    • Multiplayer
    • LiveOps
    • Data & Analytics
    • Add-ons
    • For Any Role

      • Engineer
      • Designer
      • Executive
      • Marketer
    • For Any Stage

      • Build
      • Improve
      • Grow
    • For Any Size

      • Solo
      • Indie
      • AAA
  • Runs on PlayFab
  • Pricing
    • Blog
    • Forums
    • Contact us
  • Sign up
  • Sign in
  • Ask a question
  • Spaces
    • PlayStream
    • Feature Requests
    • Add-on Marketplace
    • Bugs
    • API and SDK Questions
    • General Discussion
    • LiveOps
    • Topics
    • Questions
    • Articles
    • Ideas
    • Users
    • Badges
  • Home /
  • Feature Requests /
avatar image

Brent Batas (Lisk) suggested an idea · Jul 30, 2018 at 03:05 AM · Custom Game Servers

Automatically shutdown a server after X amount of time

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.

thub.nodes.view.add-new-comment
Brent Batas (Lisk)
Chad Franklin

People who like this

2 Show 0
10 |1200 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

2 comments

· Add your reply
avatar image

Chad Franklin commented · Jun 05, 2020 at 09:33 AM

Any chance you've encountered a solution for this?

thub.nodes.view.add-new-comment

People who like this

0 Show 0
10 |1200 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image

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();
    }
}
thub.nodes.view.add-new-comment
Chad Franklin

People who like this

1 Show 3
10 |1200 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Chad Franklin · Jun 05, 2020 at 11:09 PM 0
Share

Good enough for me. Thanks :)

avatar image Brandon Phillips Chad Franklin · Jun 06, 2020 at 12:52 AM 1
Share

@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
    }
}
avatar image Chad Franklin Brandon Phillips · Jun 06, 2020 at 01:26 AM 0
Share

Thanks again for pointing that out, probably just saved me a lot of trouble.

Navigation

Spaces
  • General Discussion
  • API and SDK Questions
  • Feature Requests
  • PlayStream
  • Bugs
  • Add-on Marketplace
  • LiveOps
  • Your Opinion Counts

    We would love to know what you need. Submit your ideas and upvote others to help us prioritize.

    Sign in to post a new idea

    Follow

    Follow This Idea

    1 Person is following this .

    avatar image

    Related Ideas

    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.

    Button to terminate a Server 2.0 server

    Servers 2.0 Archived Servers should show timestamps

    PlayFab

    • Multiplayer
    • LiveOps
    • Data & Analytics
    • Runs on PlayFab
    • Pricing

    Solutions

    • For Any Role

      • Engineer
      • Designer
      • Executive
      • Marketer
    • For Any Stage

      • Build
      • Improve
      • Grow
    • For Any Size

      • Solo
      • Indie
      • AAA

    Engineers

    • Documentation
    • Quickstarts
    • API Reference
    • SDKs
    • Usage Limits

    Resources

    • Forums
    • Contact us
    • Blog
    • Service Health
    • Terms of Service
    • Attribution

    Follow us

    • Facebook
    • Twitter
    • LinkedIn
    • YouTube
    • Sitemap
    • Contact Microsoft
    • Privacy & cookies
    • Terms of use
    • Trademarks
    • Safety & eco
    • About our ads
    • © Microsoft 2020
    • Anonymous
    • Sign in
    • Create
    • Ask a question
    • Create an article
    • Post an idea
    • Spaces
    • PlayStream
    • Feature Requests
    • Add-on Marketplace
    • Bugs
    • API and SDK Questions
    • General Discussion
    • LiveOps
    • Explore
    • Topics
    • Questions
    • Articles
    • Ideas
    • Users
    • Badges