Yes, logs are more useful this way, thanks!
I optimized my RPCs further, trying to send less data. It seems to crash a little less frequently.
So the playercount might vary, we don’t really have a hard limit yet but I’m probably going to add a queue to ensure that we don’t have too many players.
I think our peak was something like 50 players, without any issue. Might have been more with people trying to connect.
Usually it starts getting problematic near 20/25 players. I think we sometimes had crashes with fewer players. It usually stays up at time with an uptime of a few hours. At peak hours, it’s more near 10/15 minutes.
I did a lot of change since the first message, with many optimizations like handling visibility, so I’m hopeful that the crashes will at least be a little less frequent.
There are, rarely, these warnings too. But they don’t seem related to the crashes:
- Failed to decrypt packet (error: 1048580). Likely internal TLS failure. Closing connection.
- TLS handshake failed at step 1. Closing connection.
Also is it possible that some of these players are kept for a long time in background tabs in your browser? I’m wondering if perhaps the browser is not throttling down some background WebSocket connections which could cause some buildup on the server side if clients are not pulling in messages regularly enough.
Oh yeah definitely, is it something we should avoid? To be fair, we’ve been monitoring and helping people on the app because we have some people using it who are not very tech friendly. So we usually have at least two AFK players on the server, sitting on a bench and doing nothing.
Should I play around with heartbeats/disconnect timeout to avoid issues with this?
Thank you again for your time, I’ll try to investigate some more.
EDIT: it actually just crashed with two players, so this might not even be the issue.
Although, the more players joins, the more likely it seems to crash at some point. It doesn’t seem to have some issue at night for instance.
I’ve probably made a mistake somewhere but no exceptions are thrown.