Browse Source

perf: reduce server crashing by binding fewer ports for game server manager

Bryan Lee 1 year ago
parent
commit
926b262119
2 changed files with 2 additions and 2 deletions
  1. 1 1
      compose.yaml
  2. 1 1
      game-server-manager/src/game/mod.rs

+ 1 - 1
compose.yaml

@@ -77,7 +77,7 @@ services:
     expose:
       - 8200
     ports:
-      - 19000-19249:9000-9249
+      - 19000-19049:9000-9049
 
 secrets:
   postgres-url:

+ 1 - 1
game-server-manager/src/game/mod.rs

@@ -30,7 +30,7 @@ impl GamesData {
 
 const BASE_PORT: u16 = 9000;
 // TODO: configurable MAX_NUM_GAMES
-const MAX_NUM_GAMES: usize = 250;
+const MAX_NUM_GAMES: usize = 50;
 
 #[derive(Debug)]
 pub struct Games([Option<Game>; MAX_NUM_GAMES]);