Fatal mysql crash. Restarting server. Report to admin.

Hello on my server it’s doing this error like once per hour, I know it’s not the gamemode because there are no such system that restarts the map in case of a myqsl error. Im using tmysql2 on xenonservers.

Do you know what could cause this problem? It never did that before…

Can you tell us the gamemode you are running and is possible provide the code that accesses the mysql database?

Well im probably gonna get some hate from people but the gamemode im running is PERP, I know how to set it, iv’e made a good numbers of setup with it but it’s the first time I see this error. The file is:

[lua]require(“tmysql”)

tmysql.initialize(“mysql.xenonservers.com”, “username”, “password”, “database”, 3306, 1, 10)

function GM.SetTeam ( Player, Hint )
if Hint < 5 then
Player:Give(‘weapon_physgun’);
end
end[/lua]

So anyone willing to help?

Have you setup the database right, and uploaded the sql files.

It could be that some of the recent gmod updates messed it up.

Your server is probably idoling and not using the mysql for some time causing it to drop the connection.