YoYoGames / GameMaker-Bugs

Public tracking for GameMaker bugs
15 stars 7 forks source link

In-Game: [macOS/Ubuntu] Simultaneous socket limit should be raised to 1024, to match Windows #2661

Closed Tom-60 closed 4 months ago

Tom-60 commented 6 months ago

Description

Hi,

We have 2 projects for our game, a client HTML game and a multiplayer server Linux build.

While deploying our game on a Linux server and using HTML/WebSocket clients we keep running in to the same limit of there only being 63 clients allowed to connect before the 64th is refused. Just to be clear, we have tested this on a Windows machine with the same server build and we could connect more than 70 clients without issue, this is solely an issue with the Linux export of our multiplayer server build.

Please see below a screenshot of the server log, we are looking to see if there are any hard limits on the number of clients able to connect to a GMS server.

I've checked the server its self, this does not appear to be the issue since we can connect other types of sessions to the server fine while running at GMS capacity. I've also tried other backends such as Python on the server and this can easily sustain 500+ connections at once.

image

Expected Change

More than 63 connected clients at once

Steps To Reproduce

  1. Start Multiplayer Server Build
  2. Connect 65 clients, 63 will connect but from the 64th onwards they will not.
  3. See the issue

How reliably can you recreate this issue using your steps above?

Always

Which version of GameMaker are you reporting this issue for?

2023.11.1 (Monthly), 2022.0.2 (LTS), 2023.1100 (Betas)

Which platform(s) are you seeing the problem on?

Ubuntu

Contact Us Package Attached?

Sample Project Added?

stuckie commented 6 months ago

Would you be able to send in the project?

Tom-60 commented 6 months ago

Hi,

Please find attached 2 builds.

Server build is the games multiplayer server (we have a hard coded max player count of 120).

Client build for this test we have added 50 clients in 1 room to allow for easier recreation of our bug.

You will need to export the server build for Linux and we have been exporting the client for both HTML/Windows for testing.

Upon running the Linux server, try and open up 2 instances of the client, the first one will connect 50 clients successfully but the second one will only be able to open 13 before the rest get the connection refused message.

If you need anymore information please let me know. We know these builds are not functioning right in the game sense, they have been created purely to recreate the networking bug. Test Client.zip Test Server.zip

yoyo-danielc commented 5 months ago

What kind of connection count are you anticipating needing? The Windows runner is currently capped at 1024 and others at 64, the work required to raise either of those depends on exactly how scalable it needs to be.

Tom-60 commented 4 months ago

Hi, we would like the Linux client to be able to support the same amount of connections as Windows, so 1024.

How much work would this be?

Eventually we could expect 2000-3000 active players. The game would be a lightweight MMORPG style game with very little traffic between client and server.

yoyo-danielc commented 4 months ago

So a few thousand open connections wouldn't be unreasonable, however we'll be aiming for 1024 on Linux to bring it to parity with Windows in the short-term.

Depending how much data you're sending/receiving, you still might encounter limits either in terms of bandwidth or packets per second since all the network I/O is handled in the main thread at the moment (you can experiment/benchmark using fewer connections to push the same packets, as the number of distinct connections has little overhead).

yoyo-danielc commented 4 months ago

[Notes for QA]

Socket limit has been raised to 1024 on Linux and Mac to match Windows, other platforms remain at 64.

I've done some benchmarking on Linux/Mac (contact me if you want the results from that) and cursory testing only on Windows/Switch/Xbox One/PS5.

Emc1923 commented 3 months ago

Verified that the socket limit has been raised from 64 for macOS/Linux as of IDE v2024.400.0.534 Runtime v2024.400.0.553, thanks!

Image