mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2025-12-10 09:42:29 +00:00
Handle OoM errors (#43349)
Sometimes a reason 1 restart will work to fix these for servers without tgs3. This works on tgs3 even though the api sleeps, this will likely not work on tgs4. In those cases the world/Reboot call will likely still bring the server back up to a functional point that an admin can do a tgs restart via the verb. There is no point in attempting to notify clients, every attempt at doing so failed.
This commit is contained in:
committed by
Tad Hardesty
parent
c013c37a9c
commit
2cace871d8
@@ -18,7 +18,14 @@ GLOBAL_VAR_INIT(total_runtimes_skipped, 0)
|
||||
//if we got to here without silently ending, the byond bug has been fixed.
|
||||
log_world("The bug with recursion runtimes has been fixed. Please remove the snowflake check from world/Error in [__FILE__]:[__LINE__]")
|
||||
return //this will never happen.
|
||||
|
||||
|
||||
else if(copytext(E.name,1,18) == "Out of resources!")
|
||||
log_world("BYOND out of memory. Restarting")
|
||||
log_game("BYOND out of memory. Restarting")
|
||||
TgsEndProcess()
|
||||
Reboot(reason = 1)
|
||||
return ..()
|
||||
|
||||
if (islist(stack_trace_storage))
|
||||
for (var/line in splittext(E.desc, "\n"))
|
||||
if (text2ascii(line) != 32)
|
||||
|
||||
Reference in New Issue
Block a user