Maximum Size of Remote Call

Is there a maximum amount of bytes I can send through a single remote event call before Roblox will throw an error? I can’t seem to find anything exact.

tl;dr on my machine, locally, about 95 mb. It probably varies a ton.

At some point, the connection will just break without you knowing. It won’t throw an error. If it does, it will just crash the client entirely.

You can test what your limit is yourself:

  1. Put a RemoteEvent in ReplicatedStorage
  2. Put a LocalScript in StarterPlayerScripts with the code below
  3. Put a Script in ServerScriptStorage with the code below

The client just sends a bunch of data to the server, then the server sends the same amount back and it prints the time it took.

Results:

RTT for 1000 bytes: 0.35 s
RTT for 100000 bytes: 0.15 s
RTT for 1000000 bytes: 0.09 s
RTT for 10000000 bytes: 0.71 s
RTT for 50000000 bytes: 3.26 s
RTT for 75000000 bytes: 4.75 s
RTT for 90000000 bytes: 5.91 s
RTT for 95000000 bytes: 6.01 s
Lost connection to ::ffff:127.0.0.1|61925

localscript:

local remote = game:GetService("ReplicatedStorage"):WaitForChild("RemoteEvent")

local tests = {
	1000,
	100000,
	1000000,
	10000000,
	50000000,
	75000000,
	90000000,
	95000000,
	96000000, -- loses connection on my machine
}

for _, b in pairs(tests) do
	local bytes = string.rep("a", b)
	local startTime = os.clock()
	remote:FireServer(bytes)
	local received = remote.OnClientEvent:Wait()
	print(string.format("RTT for %d bytes: %.2f s", #bytes, os.clock() - startTime))
end

script:

local remote = game:GetService("ReplicatedStorage"):WaitForChild("RemoteEvent")

remote.OnServerEvent:Connect(function(player, bytes)
	remote:FireClient(player, bytes)
end)
6 Likes