Why do players keep encountering "Error 277" on my game?

My game, World War Tycoon, has been having an issue since the summer with player connection issues. Occassionally, the whole server will have this disconnect issue, thereby bringing down the overall CCU count.

First and foremost, I have done a fair amount of polls and surveys within my group’s Discord server to see how often people have disconnection issues, and a majority of players report either having no disconnection issues, or if they report having disconnection issues, they do not disconnect until after well over an hour of playtime. I myself have encountered this issue once or twice ever on the game, but the server was still up and I returned to it.

That being said, the amount of players that encounter this issue is significant enough that I see it can drop the CCU when it happens, and I assume players won’t return to the game after disconnecting, so this obviously is a hamper on my game gaining CCUs.

At first, I wrote this off as some of the player base playing on lower-end PCs and mobile devices, but some of the people reporting disconnection issues said it only happens on my game, and not many other games.

For reference, my game has the following measurable performance stats:


The compute efficiency is not the best, but I know of plenty of other games, that are pulling far more CCU numbers than my game, having significantly lower compute efficiency.

Our Client Memory Usage on PC is around 2000-3000 MB range, and on mobile, it’s in the 1500-2500 MB range. I know that is not ideal, but I don’t see many games go under 1000 MB. My developer team and I also shaved about 250-300 MB of usage from the Client Memory Usage with some recent optimization updates.

There is a fair amount of terrain on the map for the game, including water, and we do not use StreamingEnabled. I have considered using StreamingEnabled for the game, but the map isn’t the biggest terrain map I have come across, and I would prefer to not have to lower the render distance on a map that isn’t the largest. However, I am considering “hollowing” out the map a bit to free up space. Not to mention I would have to make sure everything works with StreamingEnabled.

I am going to go on a whim and assume that the terrain in my game is a big culprit.

I am not sure if this is more of something on our side, or more of something on ROBLOX’s side. What am I doing wrong, and what can I do to improve?

2 Likes

So I double checked what Error Code 277 is and I got this:
Roblox Error Code 277 is caused due to a server disconnection from either the game’s platform or from the player’s side . Slow internet is usually the reason for the abrupt stop in the gameplay. Yet, there have been times when gamers with the best FPS also encountered the issue

The main reason why the servers deploying Error code 277, may be any of the of the following:

  1. It is your internet provider’s issue, DNS or IP may be down you can try to resolve it with them

If that isn’t the case.

  1. It is your computer, some low end computers can run roblox but it would crash with either 277, or 279 popping up (maybe 279 I forgot)

Try to use a high end device, like a phone to test it out. If the game still crashes and shows 277.

  1. Roblox servers, the roblox servers are either not in a good location or low tier servers are running your game.

  2. There is a chance but it is small, check studio’s and reread your code some code might be corrupted, viruses, or too much memory, which also can create 277. You may have to rewrite it or delete some of the code if that is the case. Use the console to help you if that is the case.

Other than that I don’t know sorry :frowning:

4 Likes

This is not something that can be recreated easily, it is incredibly sporadic, I would say at least 50-75% of the playerbase (if not more) I have surveyed have reported never disconnecting whatsoever. That being said, the remaining people who experience disconnecting to various degrees of intensity are not a small number to ignore.

If this is something to do with ROBLOX servers, does ROBLOX prioritize other, bigger games over smaller ones? E.G. if there is ever a situation in which the servers need to prioritize running one game over another (if that ever happens), do they boot off a game or games if a big game needed more server use?

1 Like

Roblox servers for smaller games are always lower tiers, while better games have higher tier servers. But no they don’t boot you, it disconnects because too much scripts are running or because your current servers have lower memory that is why the servers kick.

2 Likes

We will likely continue to optimize and reduce scripts as much as possible then, but we will also very likely have to continue methods for lowering the memory usage of terrain as well - without using StreamingEnabled, for now

2 Likes

Hello,
I apologize for replying to an old post.
I’m currently experiencing a similar issue in my game.
Despite maintaining a “Compute efficiency” an average of 135% and optimizing “Server memory usage” to 0.57 GB, I’m encountering frequent 277 errors, resulting in players being kicked.
If you have any relevant information or suggestions, could you please share them?
Thank you in advance.

Game: Secret Staycation - Roblox

2 Likes
  1. Wow, good job on the success of your game!
  2. Check your client memory usage. It seems once a game’s client memory usage starts climbing past 3000MB, it causes the clients to be overwhelmed and kicked from the game.

Do you have a % of how many players you believe get kicked at any given moment?

1 Like

Thank you very much for your response.

Regarding point 2, “Client memory usage,” I’m maintaining an average of 1GB.
Additionally, the 277 error seems to occur simultaneously for all players on the same server, suggesting a potential issue on the server side.

As for the crash rate of players, while I don’t have precise figures, it’s likely that more than half of the players have encountered this issue.
In fact, since the occurrence of this problem on January 24th, the active player count has halved, indicating a significant impact on a large number of players.
Since there have been no changes to the game since the update on January 10th, it’s possible that something on the Roblox side has changed, causing these issues.

Thank you for your attention to this matter.

2 Likes

Hello,
I was able to resolve the 277 error!
The cause was an unusually high player speed, causing the server to freeze when players were blown outside the map due to a physics-related bug in Roblox.
I addressed this by monitoring player speed and forcibly respawning them when it exceeded a certain threshold.
Thank you so much, John.

1 Like

Do you mind sharing the script you used when players’ reached a certain speed? I’m curious what that speed was.

Sure!

This is something I modified to make it work as a standalone script, which was originally defined within a class. Therefor, there might be some errors in the code.

I hope this information is helpful.
Thanks!

local MaxVelocity = 1000
local MaxDistance = 800

game.Players.PlayerAdded:Connect(function(player)
	player.CharacterAdded:Connect(function(char)
		local HumanoidRootPart = char:WaitForChild("HumanoidRootPart", 10)
		if not HumanoidRootPart then return end

		local function DestroyCharacter()
			local Humanoid:Humanoid = char:FindFirstChild("Humanoid")
			if Humanoid then Humanoid.Health = 0 end

			char:Destroy()
			HumanoidRootPart = nil
		end

		local connection:RBXScriptConnection = nil
		connection = game["Run Service"].Heartbeat:Connect(function()
			if not HumanoidRootPart or not HumanoidRootPart.Parent or not char or not char.Parent then connection:Disconnect() connection = nil return end

            --If the velocity gets too big, then the physics based character rigs are broken by roblox physics bug.
			if HumanoidRootPart.AssemblyLinearVelocity.Magnitude >= MaxVelocity then
				DestroyCharacter()
			end

            --Also check the character position to make sure it's not out of the map.
			if HumanoidRootPart.Position.Magnitude > MaxDistance then
				DestroyCharacter()
			end
		end)
	end)
end)
1 Like

Thank you! I likely won’t be using the maximum distance part, since players are able to fly around and such around the map and killing them based on that will likely annoy them, but I will definitely look into using this for my game.

Do you use streaming enabled?

1 Like

I’m using streaming enabled.
I don’t think there’s likely to be a problem with streaming enabled, but if you’re not using it, it might be worth trying it out once.

1 Like

Yeah, I think that’s really one of my last hopes here.

I did some experimenting with it before and it broke some things, and it was going to take too long to mitigate some of those issues as we were adding new content (the Yak-9), so I ended up cancelling/reverting those experiments sadly.

1 Like

If you set the ModelStreamingMode of all models to Persistent for the time being, I think it will be the same as when StreamingEnabled is off from the client side. (However, there’s nothing we can do about parts that are not included in the model…)
I think using StreamingEnabled would significantly reduce the impact of Terrain, so it seems worth trying after all!

The only things I would make exempt from StreamingEnabled would be the indicator points for telling where bases, capture points, etc. are, some parts regarding camera functions (like the one you see when you join the game), and maybe the bases.

A HUGE consumer of memory was PhysicsParts and Collisions, like something around 1-2GB, so StreamingEnabled should fix that

1 Like