21.10.2010, 17:35
Quote:
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'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.