• 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!

Windows MySQL Lost Connection

keilost

Member
Joined
Aug 4, 2012
Messages
63
Reaction score
12
Location
Brazil
Hello, I need some help to fix a bug..
When I turn on my server, it saves the player normal after about 4 hours it gives a bug where it loses connection to the database MysQL ..
Look at the photo:
error.jpg
can anyone help me?
 
In what way do you have your players save?

Do you have scripts that read and write to database using

Db.executeQuery
Db.getResult

Things like that?

If so try disabling them and testing, that will rule out weather or not it has something to do with those scripts
 
This is my script:
local config = {
broadcast = {120, 30},
shallow = "no",
delay = 120,
events = 30
}

config.shallow = getBooleanFromString(config.shallow)

local function executeSave(seconds)
if(isInArray(config.broadcast, seconds)) then
local text = ""
if(not config.shallow) then
text = "Full s"
else
text = "S"
end

text = text .. "erver save within " .. seconds .. " seconds, please mind it may freeze!"
doBroadcastMessage(text)
end

if(seconds > 0) then
addEvent(executeSave, config.events * 1000, seconds - config.events)
else
doSaveServer(config.shallow)
end
end

function onThink(interval)
if(table.maxn(config.broadcast) == 0) then
doSaveServer(config.shallow)
else
executeSave(config.delay)
end

return true
end

- - - Updated - - -

UP!
 
Okay, try and increase your maximum packet size and increase the amount of connections allowed to the MySQL by the user of the server
 
Back
Top