question

Brent Batas (Lisk) avatar image
Brent Batas (Lisk) asked

Custom game servers automatically closing

Are there some failsafes that cause a custom game server to automatically close?

I notice that under high load (1,000+ users trying to log on at the same time), my lobby server ("city server") frequently closes without any errors/warnings.

Just trying to figure out what the cause is. I am guessing either AWS or PlayFab has a safeguard against DDoS and it is thinking it is being attacked.

Custom Game Servers
1 comment
10 |1200

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

Brent Batas (Lisk) avatar image Brent Batas (Lisk) commented ·

Also I'm noticing a bunch of game servers ("dungeon" servers) starting up and closing with no logs/error messages after about 10 seconds. I'm not sure why they would close, other than an error upon startup.

Edit: example titleID 9092, game IDs:

D2FDA5369974C1DE

3DD63989C6CD5A18

7FE3A5A6C423070F

B12BB1A7BABF40D8

28A519BF493AE906

E7EBEE20A5426436

0 Likes 0 ·

1 Answer

·
brendan avatar image
brendan answered

No, the way our hosting works is that we launch the executable you've specified in the configuration. Only when that executable exits do we copy off the log and output files and mark that instance as "free" (and then, if there are no instances running on that host machine, and taking it away won't put you below the min slots setting, we shut down the server host).

AWS does have DDoS protections, but that actually wouldn't be relevant to your case unless you're doing something really unusual like flooding the server with HTTP calls. What you have is a server where each game instance is allocated a port. Clients connect, usually via TCP, to custom game servers on that port. The theoretical limit on connected players is extremely high, but in practical terms, you need to determine what your actual resource usage is like. There's a small amount of memory used per connected player (the TCP Control Block), but the actual traffic is then also a factor. What's best is to do some testing locally, so that you have direct access to the machine and can check everything about it - available memory, CPU usage, etc. - as you load on 1, 10, or 100 test users. My suspicion, if you're not seeing any errors in your log files and you're confident that you're logging all errors, is that you're probably running out of memory, but a quick local scale test should be able to confirm that.

For the instances exiting just after they start there isn't any more that we can add apart from what your logs show - all we do is run the executable provided and then capture the log and output files when it's done. I'm not seeing anything in the EC2 reports that would indicate any kind of systemic issue with the servers being allocated.

1 comment
10 |1200

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

Brent Batas (Lisk) avatar image Brent Batas (Lisk) commented ·

Thanks, that's helpful. Out of memory makes sense for the 1,000+ users situation, but not for the game servers closing after 10 seconds with no connected players. I'll keep digging around, though. For the time being, things are a little more stable than before after I implemented a login queue/throttle.

0 Likes 0 ·

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.