Roblox Game disconnecting everyone with error 277 every 10-20 minutes

Hi everyone on the DevForum.

I’ve been facing this problem since October 2023, and would like to see if anyone on the DevForum have also experienced this problem.
Basically, me and my friends made 2 games and published it, however, it came to our attention that the memory usage is extremely high, staying at around 1500-2000MB for both client and server side. However, we’ve tried optimising it as much as we could, here are some information that could help:

  • The game contains 13 while loops.
  • The game contains 43K part count.

When the game was released, every 10-20 minutes when a server is open, 2 situations may occur. Either some players will have their client crashed without any error (the Roblox app closes itself on its own), or the entire server stopped responding and came up with Error 277 (check internet connection).

This problem has been struggling me as a programmer for over half a year now, and I hope to see a proper solution from this post, as I really is unable to make my own game with the servers crashing itself every few minutes or so.

Lastly, thank you everyone who spent their time on this post. :heart:

4 Likes

Theres a memory leak in your game, try play testing without the GUI or without some scripts of the game to check what is the problem for the high memory use

some of the common memory leaks are made by making a new function in a loop

while task.wait() do 
	Part.Touched:Connect(function()
		--Your code
	end)
end
1 Like

Will memory leak also occur if I start a function in a for loop?

2 Likes

Memory leaks occur when you don’t properly clean/disconnect data that is otherwise not auto-garbage-collected, such as some connections, run service binds, uncleaned tables, etc.

Give this a read: Garbage Collection and Memory Leaks in Roblox - What you should know

1 Like

Hi, I’ve tried optimising it and working with Garbage Collection today, but the server MB is still at around 1200MB, no matter how much I’ve tried to reduce it.

Is there another other ways to check and resolve the problem?