question

phineascarb avatar image
phineascarb asked

Server shuts down locally but not when deployed,Shutting down server works locally, not when deployed

Have a linux container running a unity dedicated server build, when simulating locally with gsdk the server shuts down properly when a client disconnects, but will stay up when deployed. I can keep disconnecting and reconnecting, and cant host anymore servers because the cap fills up.

Have Application.Quit(); at the top of OnServerDisconnect so not sure what else could be going wrong...

2021.2.13 dedicated linux server build target -- running latest ubuntu 20.04 LTS

build ID f5a6201c-6ab5-4c46-a81a-3cbc777388ed, have to delete the region to make the servers shut down :/

,

I'm running a local gsdk playfab server and using code I found in the examples project, when a client disconnects the docker container for the linux server shuts down. But when I deploy it the server wont shut down, I can keep connecting to it, and I can host any more because the server cap fills up.

Have Application.Quit(); at the top of OnServerDisconnect so not sure what else I can do.

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

phineascarb avatar image phineascarb commented ·

Sorry wrote post when not logged in, pressed the login and post button and the entire post seemed to go away so rewrote it. Now both posts exist on top of eachother lol

0 Likes 0 ·
Rick Chen avatar image Rick Chen ♦ commented ·

Did you use the Unity Mirror sample? The Application.Quit() is not enough, have you called NetworkServer.Shutdown() on OnApplicationQuit? Please refer to this code snap: MpsSamples/UnityNetworkServer.cs at main PlayFab/MpsSamples (github.com)

0 Likes 0 ·
phineascarb avatar image phineascarb Rick Chen ♦ commented ·

Yeah in the OnApplicationQuit method NetworkServer.Shutdown(); is called

0 Likes 0 ·
phineascarb avatar image phineascarb Rick Chen ♦ commented ·

oh well I feel stupid now, of course its working... I saw "no hosts available" and assumed it meant the servers weren't shutting down properly.. but uh, it takes time after the server shuts down for another one to spin up on standby. I'm just going to go die now because I'm questioning my career choices right now

0 Likes 0 ·
Rick Chen avatar image Rick Chen ♦ phineascarb commented ·

Glad to hear that you have found the issue. If you have any further question, please let us know.

0 Likes 0 ·

1 Answer

·
phineascarb avatar image
phineascarb answered

answer is I'm dumb and its been working all along

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

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.