Thread stall / a resource is taking too long
One script held everything up. Unlike a general stutter, this one names the resource responsible.
Do this first
Note the resource it names — that is where the problem is.
What it means
A script thread did not yield when the scheduler expected it to. Everything else on that side waits. Like a hitch warning this is a symptom, not a failure, but a stall usually points at one specific piece of code rather than at general load.
What causes it
Ordered by how often it is the answer.
- 1
A loop with no Wait
The classic.
while true do endnever returns control. - 2
A blocking await inside a tick
MySQL.query.awaitorCitizen.Awaitinside a thread that runs every frame. - 3
An enormous synchronous operation
Encoding or decoding a very large JSON payload, or iterating a table with hundreds of thousands of entries, in one go.
- 4
A while loop whose condition is never satisfied
while not HasModelLoaded(m) do Wait(0) endfor a model that does not exist spins forever. Every such wait needs a deadline. - 5
Recursion without a base case
Rare, but it presents exactly like this.
How to tell which one is yours
The message names the resource. Inside it, look for while and for without a Wait, and for any .await inside a CreateThread.
Where to look
Every loop in the named resource.
How to fix it
Give every wait a deadline, and yield in every loop:
local deadline = GetGameTimer() + 5000
while not HasModelLoaded(model) and GetGameTimer() < deadline do
Wait(0)
end
if not HasModelLoaded(model) then return endSplit very large work across frames:
for i = 1, #huge do
process(huge[i])
if i % 500 == 0 then Wait(0) end
endStill stuck on your own code?
This page is what this error usually means. Paste your console into Server Fixer and it will rank everything in it and tell you what to do first, and if you would rather not touch it, ORBIE can repair the script and hand the resource back ready to drop in.
bug_reportOpen Server Fixer