Server randomly timing out all users

Hey there.

I’ve got a game set up that is an open world persistent building game. For some reason, in the last few hours since I pushed an update, my game has been running for a few minutes and then everyone in the game receives an error:

“Please check your internet connection and try again — Error Code: 227”

The only resources I can find is that this has to do with something on the client side… but it’s happening to every single user simultaneously in my game.

There are no scripts which constantly run. It only seems to happen when multiple users are in the game together.

Any ideas for where I can look to try to solve this issue?

As an FYI, the update consisted of a couple of script tweaks. I added nothing new. The most notable thing is a wait() function on a datastore loading for loop because it was timing out.

Well I guess this wait function would be the best place to start looking.
Is each individual player’s datastore access arranged on separate threads? I’m just thinking if its in a loop, a delay for one player may trigger waits for every other player causing the code to hang and eventually timeout, triggering the Error.

No, it’s all on the same thread. It’s a server-wide datastore, so it only loads once.

If it was working prior to the update you could roll it back, then add the tweaks back in one by one (or a few at a time if they are minor) until it breaks again, at least that should narrow it down.

Then if you could post the portion of code you think is causing the issue we might be able to identify an issue.

But just to expand on the possibility it is the loading loop, does the loop complete? Are the clients waiting for the loop to complete? Are you using any datastore modules? Or session locking?

I have narrowed it down to an issue when a player joins. There is a massive spike in network total data, somewhere between 9-14k.

I have disabled every single script and it’s still causing issues. I do not know what is happening.

When players join it would be normal to have a spike in network usage as the server still needs to replicate the game to the client, get info about the player and integrate it all on the server.

I found this on data usage which might be useful. You mentioned it was a persistent building game, so I guess cumulatively the data transfer could cause an issue??