Navigation

  • Recent
  • Tags
  • Users
  • Search
  • Login
Colyseus
  • Login
  • Search
  • Recent
  • Tags
  • Users

Documentation GitHub

We're migrating to GitHub Discussions. This forum does not accept new registrations since April 6, 2023.
  1. Home
  2. bqd1999
B

bqd1999

@bqd1999

Chat Follow Unfollow
0
Reputation
1
Posts
738
Profile views
0
Followers
0
Following
Joined 20 Aug 2021, 03:36 Last Online 21 Aug 2021, 19:55

  • Profile
  • More
    • Continue chat with bqd1999
    • Flag Profile
    • Following
    • Followers
    • Topics
    • Posts
    • Best
    • Groups
bqd1999 Follow

Posts made by bqd1999

Seat reservation expired when running Colyseus in cluster mode

Hi everyone, I started using Redis to handle the multi-threaded processes with Colyseus. I followed the instruction in this link https://docs.colyseus.io/colyseus/scalability/

The problem is when running processes in fork mode, the room in which players playing only living on one core only. I used pm2 to monitor each core load and realized that only one core is being used all the time.

So to get around the problem, I wanted to use cluster mode with pm2, so each of the 4 cores will handle one node. So 16 cores in total, 4 cores each node in cluster mode, so there will be 4 ports.

I tested this method, and it seems running so well on Windows, with no errors at all, and it does what I expected (4 cores started running when I created a room). I used Redis Windows. You can take a look here https://redis.com/ebook/appendix-a/a-3-installing-on-windows/a-3-2-installing-redis-on-window/

However, every time I bring the project on Linux and use Redis stable version to test. It's always pulling out the error "Seat reservation expired". The room will be created and then the error will appear, and then the room will be removed immediately.

So my best guess is something went wrong with Redis so I couldn't make it work on Linux with cluster mode.

So anyone has ideas to run Colyseus in cluster mode?

Note:
Redis Windows version is 2.4.6
Redis Stable version is 6.2
Redis version I tried to use on Linux (Ubuntu 18.04) is 2.6.9

posted in Questions & Help • 20 Aug 2021, 03:52

© 2023 Endel Dreyer