I have recently ported over my game to a new place and released a new update. However, I am having an issue where the server would randomly crash, kicking out all players in the process and any players trying to join the server (or even click play on my game) get kicked with an ID=17 error.
I have reviewed almost all of my server scripts and I’m not sure what is causing it.
Does anyone of you know some of the common causes for server crashes? I have tried looking for while loops and repeat loops without waits in them (because that was the issue a few months ago when I had the same problem) but I haven’t found any of them.
Large amount of parts? Unanchored parts? if only one person is in the server, its very unlikely that it is an exploiter. Like @1ik said, it could just be roblox. Judging no one else is having this issue, maybe something else is in your script causing the lag.
I have reviewed all the changes I’ve made since the last update, but I couldn’t find anything that would possibly lag the game. Is there anything that can cause a server to crash instantly (not gradually lag out and crash) that isn’t a while or repeat loop without wait inside of it?
The server just freezes all of a sudden at unexpected times (can’t even pinpoint which script is causing the freeze) and there aren’t any glitches. Sometimes it crashes when the round ends, sometimes in the middle of a round, sometimes during countdown, etc. When the server freezes, players in the server get kicked out after a few seconds with an error code 277 “Please check your internet connection and try again” and the server stays in the server list for a few minutes. Anyone who tries to join the frozen server gets kicked out with ID=17 as the reason.
Problem fixed and lesson learned! For those who want to know what was the cause of the server crash:
My game clones GUIs from the server into PlayerGui of players that join the game (I know, it may be a terrible system, but I am too lazy to replace it for now).
One of the GUIs had a ViewportFrame inside of it and, as a result, whenever someone joined the server there would be a chance that the server would crash.
I fixed the bug by creating the ViewportFrame needed using a LocalScript.
I have no clue but your best bet is to try creating the ViewportFrames (or WorldModel, not sure what causes the crashes) through a script and see if the problem persists.