Server Laggs and crashes
#1

Some time ago we released a big update on our server (sig), this update involved some pretty big scripts which contained a considerable amount of PVars & timers. Also we added a full MySQL system + 1100 houses.

Ever since that update our server is having "lagg jumps" which last about 5-20 seconds. It's weird because the server seems to have good ping but then suddenly the lagg starts and it seems like the server stalls for some time, like as if you would unplug your internet cable for a moment. After that the lagg dissapears and the server is fine again.

It seems like this lagg is always there, even with few players, but when many players get on (i'm talking 25+) the server is is lagging a lot more often and crashes after a while without restarting (meaning we have to restart it through the host's control panel). When the server crashes all you get to see when trying to join the server is "Joining server, please wait...".

Does anyone know what might cause this? Or has anyone had this before?

Some sidenotes:
• We are hosted at ServerFFS
• We use a lot of filterscripts (about 13 I think), maybe the host can't handle so many?
• We use MySQL that connects to many parts of the server (login system, player saving, houses, etc...)
♦ The time it takes the server to crash lowered when we deleted a filterscript, but it didnt go away so maybe the problem isn"t the scripting?

Help would be greatly appreciated coz were losing players every day.
Ask additional information if you need any.

If you'd like to see it for yourself the server's IP is: 174.34.144.162:9800


If the owner sees this add whatever you like
~[SP]Sinner
Reply
#2

Which MySQL plugin are you using?
Reply
#3

Well, I'm assuming it's not consistent (the lag doesn't happen exactly every 30 seconds or anything). If it is, then well you have a head start.

Anyway, do you have any functions that call a lot of MySQL queries? If so, optimize them. Make sure you only select fields that you need, that your tables are indexed correctly, and use LIMIT 1 when you are only retrieving one record. If you want some help with optimizing any of your queries, post them here and I'll have a look.

If you can't find anything, start debugging. Put print()'s in all your timers, and watch for big jumps in the timestamps.

If that fails, then it could be a specific command or some other player action that's doing it. Print all OnPlayerCommandText's and look for big jumps in the log timestamps.

I recently had a similar problem to you and wrote a script to add print("FunctionName()"); after every function so I could see in order, which functions were called before the server crashed or lagged. If you want to borrow it, I could try and find it for you.

If I think of anything else I'll post here.
Reply
#4

Quote:
Originally Posted by Blacklite
View Post
Well, I'm assuming it's not consistent (the lag doesn't happen exactly every 30 seconds or anything). If it is, then well you have a head start.

Anyway, do you have any functions that call a lot of MySQL queries? If so, optimize them. Make sure you only select fields that you need, that your tables are indexed correctly, and use LIMIT 1 when you are only retrieving one record. If you want some help with optimizing any of your queries, post them here and I'll have a look.

If you can't find anything, start debugging. Put print()'s in all your timers, and watch for big jumps in the timestamps.

If that fails, then it could be a specific command or some other player action that's doing it. Print all OnPlayerCommandText's and look for big jumps in the log timestamps.

I recently had a similar problem to you and wrote a script to add print("FunctionName()"); after every function so I could see in order, which functions were called before the server crashed or lagged. If you want to borrow it, I could try and find it for you.

If I think of anything else I'll post here.
I'm confident that that will help a lot, thanks dude!
I'll redirect the owner this way since I'm not familiar with MySQL, and yes you had it right about the lags there not consistent.

@Calgon, we made our own MySQL system, I can't seem to tell who made the plugin, it's just called mysql.dll and I can't find additional information about the author.
Reply
#5

Quote:
Originally Posted by Calgon
View Post
Which MySQL plugin are you using?
G-Stylezzz R5 plugin.

I will try cleaning up mysql quaries and see if that helps.
Reply
#6

It seems like the problem is the host, has anyone else had similar problems with ServerFFS servers?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)