• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!
  • 2026 staff recruitment is open! Check it out and consider applying!

help with freezing

Laudson1995

New Member
Joined
Jan 25, 2019
Messages
37
Solutions
1
Reaction score
3
Can anyone help me? The server keeps freezing, and it's not a connection issue; it happens every hour when it saves.

The task 'accept' has expired, it has not been executed in 30000.
The task 'close' has expired, it has not been executed in 30000.
1767301449211.webp
 
If the server is busy saving map data, this could be the cause if the map is very large. Try disabling it and test again. It depends on what is saving or clearing the map simultaneously, and also on which processes are running all these tasks; it may be reaching its capacity limit!
 
Se o servidor estiver ocupado salvando dados do mapa, isso pode ser a causa caso o mapa seja muito grande. Tente desativá-lo e teste novamente. Depende do que está salvando ou limpando o mapa simultaneamente, e também de quais processos estão executando todas essas tarefas; pode ser que esteja atingindo seu limite de capacidade!
Onde posso fazer isso? Configurei o comando serve para 12:00 e sem desligamento, apenas uma vez por dia.
Post automatically merged:

Can anyone help me with this problem? base crystal +
Onde posso fazer isso? Configurei o comando serve para 12:00 e sem desligamento, apenas uma vez por dia.
Post automatically merged:

@Gesior.pl
 
Last edited:
First, the problem lies in the moment the server save.
You need to check the serve save script, whether in lua or src, and analyze the loops it goes through; excessive reading and writing of information can cause this, or in the last case, your machine is insufficient for such a large server.
Also, avoid printing text in loops, this causes slowness!
Without a script or at least knowing which distri you are using, it's difficult to help!
 
you see any erro in the script? =
local function serverSave(interval)
if configManager.getBoolean(configKeys.TOGGLE_SAVE_INTERVAL_CLEAN_MAP) then
cleanMap()
end

saveServer()
local message = string.format(SAVE_INTERVAL_CONFIG_TIME > 1 and "Server save complete. Next save in %d %ss!" or "Server save complete. Next save in %d %s!", SAVE_INTERVAL_CONFIG_TIME, SAVE_INTERVAL_TYPE)
Game.broadcastMessage(message, MESSAGE_GAME_HIGHLIGHT)
logger.info(message)
Webhook.sendMessage("Server save", message, WEBHOOK_COLOR_WARNING)
end

local save = GlobalEvent("save")

function save.onTime(interval)
local remainingTime = 60 * 1000
if configManager.getBoolean(configKeys.TOGGLE_SAVE_INTERVAL) then
local message = "The server will save all accounts within " .. (remainingTime / 1000) .. " seconds. \z
You might lag or freeze for 5 seconds, please find a safe place."
Game.broadcastMessage(message, MESSAGE_GAME_HIGHLIGHT)
logger.info(string.format(message, SAVE_INTERVAL_CONFIG_TIME, SAVE_INTERVAL_TYPE))
addEvent(serverSave, remainingTime, interval)
return true
end
return not configManager.getBoolean(configKeys.TOGGLE_SAVE_INTERVAL)
end

if SAVE_INTERVAL_TIME ~= 0 then
save:interval(SAVE_INTERVAL_CONFIG_TIME * SAVE_INTERVAL_TIME)
else
return logger.error(string.format("[save.onTime] - Save interval type '%s' is not valid, use 'second', 'minute' or 'hour'", SAVE_INTERVAL_TYPE))
end

save:register()
Post automatically merged:

First, the problem lies in the moment the server save.
You need to check the serve save script, whether in lua or src, and analyze the loops it goes through; excessive reading and writing of information can cause this, or in the last case, your machine is insufficient for such a large server.
Also, avoid printing text in loops, this causes slowness!
Without a script or at least knowing which distri you are using, it's difficult to help!
 
you see any erro in the script? =
local function serverSave(interval)
if configManager.getBoolean(configKeys.TOGGLE_SAVE_INTERVAL_CLEAN_MAP) then
cleanMap()
end

saveServer()
local message = string.format(SAVE_INTERVAL_CONFIG_TIME > 1 and "Server save complete. Next save in %d %ss!" or "Server save complete. Next save in %d %s!", SAVE_INTERVAL_CONFIG_TIME, SAVE_INTERVAL_TYPE)
Game.broadcastMessage(message, MESSAGE_GAME_HIGHLIGHT)
logger.info(message)
Webhook.sendMessage("Server save", message, WEBHOOK_COLOR_WARNING)
end

local save = GlobalEvent("save")

function save.onTime(interval)
local remainingTime = 60 * 1000
if configManager.getBoolean(configKeys.TOGGLE_SAVE_INTERVAL) then
local message = "The server will save all accounts within " .. (remainingTime / 1000) .. " seconds. \z
You might lag or freeze for 5 seconds, please find a safe place."
Game.broadcastMessage(message, MESSAGE_GAME_HIGHLIGHT)
logger.info(string.format(message, SAVE_INTERVAL_CONFIG_TIME, SAVE_INTERVAL_TYPE))
addEvent(serverSave, remainingTime, interval)
return true
end
return not configManager.getBoolean(configKeys.TOGGLE_SAVE_INTERVAL)
end

if SAVE_INTERVAL_TIME ~= 0 then
save:interval(SAVE_INTERVAL_CONFIG_TIME * SAVE_INTERVAL_TIME)
else
return logger.error(string.format("[save.onTime] - Save interval type '%s' is not valid, use 'second', 'minute' or 'hour'", SAVE_INTERVAL_TYPE))
end

save:register()
Post automatically merged:
I read the script and i see some line's maybe this because of the freeze.
take a backup from your server-save file and try my code.

local function serverSave()

saveServer()

local message = string.format(
SAVE_INTERVAL_CONFIG_TIME > 1 and
"Server save complete. Next save in %d %ss!" or
"Server save complete. Next save in %d %s!",
SAVE_INTERVAL_CONFIG_TIME,
SAVE_INTERVAL_TYPE
)

Game.broadcastMessage(message, MESSAGE_GAME_HIGHLIGHT)
logger.info(message)
end

local save = GlobalEvent("save")

function save.onTime(interval)
if not configManager.getBoolean(configKeys.TOGGLE_SAVE_INTERVAL) then
return true
end

local remainingTime = 60 -- seconds

Game.broadcastMessage(
"The server will save all accounts in 60 seconds.\nYou may experience a short lag.",
MESSAGE_GAME_HIGHLIGHT
)

logger.info("Server save scheduled in 60 seconds.")

addEvent(serverSave, remainingTime * 1000)

return true
end

if SAVE_INTERVAL_TIME ~= 0 then
save:interval(SAVE_INTERVAL_CONFIG_TIME * SAVE_INTERVAL_TIME)
else
logger.error(string.format(
"[save.onTime] Invalid save interval type: %s (use second/minute/hour)",
SAVE_INTERVAL_TYPE
))
end

save:register()
 
I read the script and i see some line's maybe this because of the freeze.
take a backup from your server-save file and try my code.

local function serverSave()

saveServer()

local message = string.format(
SAVE_INTERVAL_CONFIG_TIME > 1 and
"Server save complete. Next save in %d %ss!" or
"Server save complete. Next save in %d %s!",
SAVE_INTERVAL_CONFIG_TIME,
SAVE_INTERVAL_TYPE
)

Game.broadcastMessage(message, MESSAGE_GAME_HIGHLIGHT)
logger.info(message)
end

local save = GlobalEvent("save")

function save.onTime(interval)
if not configManager.getBoolean(configKeys.TOGGLE_SAVE_INTERVAL) then
return true
end

local remainingTime = 60 -- seconds

Game.broadcastMessage(
"The server will save all accounts in 60 seconds.\nYou may experience a short lag.",
MESSAGE_GAME_HIGHLIGHT
)

logger.info("Server save scheduled in 60 seconds.")

addEvent(serverSave, remainingTime * 1000)

return true
end

if SAVE_INTERVAL_TIME ~= 0 then
save:interval(SAVE_INTERVAL_CONFIG_TIME * SAVE_INTERVAL_TIME)
else
logger.error(string.format(
"[save.onTime] Invalid save interval type: %s (use second/minute/hour)",
SAVE_INTERVAL_TYPE
))
end

save:register()
put when he is working i say for you, but you see anything in this script on the task accept?
 
LUA:
if configManager.getBoolean(configKeys.TOGGLE_SAVE_INTERVAL_CLEAN_MAP) then
    cleanMap()
end

Your problem might be with the active map clearing, this will scan the map and remove pickable/corpses items.
The problem is that this can remove items from the map if there's no control over them!
 
LUA:
if configManager.getBoolean(configKeys.TOGGLE_SAVE_INTERVAL_CLEAN_MAP) then
    cleanMap()
end

Your problem might be with the active map clearing, this will scan the map and remove pickable/corpses items.
The problem is that this can remove items from the map if there's no control over them!
I read the script and i see some line's maybe this because of the freeze.
take a backup from your server-save file and try my code.

local function serverSave()

saveServer()

local message = string.format(
SAVE_INTERVAL_CONFIG_TIME > 1 and
"Server save complete. Next save in %d %ss!" or
"Server save complete. Next save in %d %s!",
SAVE_INTERVAL_CONFIG_TIME,
SAVE_INTERVAL_TYPE
)

Game.broadcastMessage(message, MESSAGE_GAME_HIGHLIGHT)
logger.info(message)
end

local save = GlobalEvent("save")

function save.onTime(interval)
if not configManager.getBoolean(configKeys.TOGGLE_SAVE_INTERVAL) then
return true
end

local remainingTime = 60 -- seconds

Game.broadcastMessage(
"The server will save all accounts in 60 seconds.\nYou may experience a short lag.",
MESSAGE_GAME_HIGHLIGHT
)

logger.info("Server save scheduled in 60 seconds.")

addEvent(serverSave, remainingTime * 1000)

return true
end

if SAVE_INTERVAL_TIME ~= 0 then
save:interval(SAVE_INTERVAL_CONFIG_TIME * SAVE_INTERVAL_TIME)
else
logger.error(string.format(
"[save.onTime] Invalid save interval type: %s (use second/minute/hour)",
SAVE_INTERVAL_TYPE
))
end

save:register()
this script fiex this problem?
 
I tested the script and it worked, however the freeze doesn't happen on save, but randomly, it can happen every hour or every 5 minutes, sometimes even 10 hours without freezing. I don't know what to do.
 
Did you add any random c++ code to your source?
Check if there are infinite loops
Search for all addEvents with microsoft visual code search function
 
Back
Top