I am trying to pin point what the issue is with my server. When players try to change weapons it takes 5 mins years to register the change. It slowly feels like it is breaking down right before it decides to crash and needs to restart for it to play again.
Things I think could be causing it:
-The MySQL functions to save data on my server
-Maybe I used to many user-messages or something
-Maybe I am overusing the callback functions for saving data in the MySQL database
-Could my MySQL database be to large for this and is causing a huge delay in lag? There are 898 pages of information in my database. That is 26940 worth of info
-I have sourcebans on my server along with ulx mysql on it
Addons on my server - http://steamcommunity.com/sharedfiles/filedetails/?id=225661705
Net-graph information -
The MySQL code uses call back functions to send and receive the data.
Main code for mysql funciton Credit to everyone who helped me with this like robotboy and everyone else:
function testget(self,key, default, callback) local retVal = default insertQ = PDataDB:query("SELECT `value` from `playerdata` WHERE `uniqueid`='" .. self:UniqueID() .. "' AND `key` = '" .. key .. "'") insertQ.onError = DBError insertQ.onData = function(self, data) retVal = data.value or default end insertQ.onSuccess = function(self) callback(retVal); end insertQ:start() end
The server is running Linux.