mySQL DarkRP Lag Problem -- Possibly an easy fix?

So I’ve got a curious problem today, I’ve decided to open multiple darkrp servers & in order to save stats cross-server I need to use mySQL. So everything is pretty straight forward, get the databases configured etc, all goes smoothly and I’ve got two servers up and running and populating nicely. Now, here’s the problem. Ever since I switched to mysql these seemingly random 2-3 second freezes would occur, at first I thought it was adv dupe, or adv dupe 2, and then I realised it happened whenever a player joined the game, ( in console : [DarkRP] *** Name **** (*** SteamID ***) has joined the game )

Has anybody else experienced this, or figured out a solution to the problem? I’ve heard of a few other people report it but never actually seen a real solution.

Thanks!

Learn to code then fix it maybe?

Thanks for the ‘help’

Anybody got any actual ideas on what would cause this? Other than there being some sort of inefficient code whenever the server tries to contact the database?

My best guess is that either
A) Your query is causing the server to hang while send/recieve information about the player, that may not be obtainable when it is called.
B) You are querying your server too often, such as sending the same query multiple times because of coder error.

How to fix it:
Look through code and ensure it is running properly and not running too often.
Figure it out with DBugR
Switch to tmysql. Never done this before, may require recoding stuff, may or may not be better.

My darkrp version is quite old, perhaps updating would help fix the issue?

How old are we talking? If we’re talking pre 2.5.x or w/e the last major version update was then yes, you should probably try updating and see if that helps.

I’d be curious to know how many players you are getting when this becomes an issue?

Lastly do you have any custom scripts installed that use mysql or any scripts that you have written yourself that may use mysql improperly?

I use quite a few scripts from scriptfodder ( previously from coderhire )

The ones that currently use mySQL would be
ArcBank
ItemStore ( inventory system )
and the 3d car dealer from rocketmania

As far as how old we’re talking, roughly 2 months or so since the last time I downloaded it from github. It becomes an issue right around 5 players, I had no problem with lag maxing the server out at 40 players before I switched to mysql.

Remember, the lag only occurs when a player connects ( and possibly disconnects? not sure on that one )

Rocketmania has a wonderful history with sql and ItemStore sounds like it could cause a problem if the coder isn’t the smartest.