SA-MP Forums Archive
mySQL Online Map laggs the server - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: mySQL Online Map laggs the server (/showthread.php?tid=74037)



mySQL Online Map laggs the server - joco96 - 19.04.2009

Hi!
I made an online map for my own server. This script saves player's positions in every 5 sec, but sometimes my server laggs with 1 online player. It has a 'onlinemap' table and the table has 200 records/rows. I'm just using 1 of them if a player is online. I don't know how can I fix it. I'm using Adrenaline's mySQL plugin(0.14). And my memory usage growing too with 4-12 kbytes and it doesn't want to stop. :S

Thanx!
Sorry for my bad english!


Re: mySQL Online Map laggs the server - Misiek - 19.04.2009

First, use HEAP table, which is stored in RAM. It disappears when you turn off the computer, but is much faster than tables stored on a hard drive. Simply use MEMORY engine instead of MyISAM, InnoDB or whatever you do currently. Just remember, that you have to use Create table if not exists in OnGameModeInit.

Second, Adrenaline's plugin is buggy and leads to many memory leaks so i wouldn't recommend it. Even if the newest version is said to have them fixed. Try the other plugin instead.


Re: mySQL Online Map laggs the server - joco96 - 20.04.2009

I tried it, but it crashed my server :S(G-stylezz's plugin)


Re: mySQL Online Map laggs the server - joco96 - 20.04.2009

anyone else?


Re: mySQL Online Map laggs the server - ADreNaLiNe-DJ - 22.04.2009

Quote:
Originally Posted by [HUN
Peti ]
anyone else?
First of all, why don't you save player position each 5 seconds ?
Why not once per minute, it will take less cpu...

Secondly, memory leaks will be fixed in the next few days (v0.15).


Re: mySQL Online Map laggs the server - tom_jonez - 22.04.2009

u should use a file to save the positions. and then use as ftp or php ftp and connect and grab it.


Re: mySQL Online Map laggs the server - joco96 - 23.04.2009

Quote:
Originally Posted by [RAZ
ADreNaLiNe-DJ ]
Quote:
Originally Posted by [HUN
Peti ]
anyone else?
First of all, why don't you save player position each 5 seconds ?
Why not once per minute, it will take less cpu...

Secondly, memory leaks will be fixed in the next few days (v0.15).
Hmm
So U say I save one player's position and 5 seconds later another player's?



Re: mySQL Online Map laggs the server - ADreNaLiNe-DJ - 23.04.2009

Quote:
Originally Posted by [HUN
Peti ]
Quote:
Originally Posted by [RAZ
ADreNaLiNe-DJ ]
Quote:
Originally Posted by [HUN
Peti ]
anyone else?
First of all, why don't you save player position each 5 seconds ?
Why not once per minute, it will take less cpu...

Secondly, memory leaks will be fixed in the next few days (v0.15).
Hmm
So U say I save one player's position and 5 seconds later another player's?
nop, instead saving each 5 seconds the position of the player try once per minute...


Re: mySQL Online Map laggs the server - sushihusi - 24.04.2009

Peti lйcci нrd le magyarul mer egyaltaan nem ertettem XD


Re: mySQL Online Map laggs the server - joco96 - 24.04.2009

Quote:
Originally Posted by [RAZ
ADreNaLiNe-DJ ]
Quote:
Originally Posted by [HUN
Peti ]
Quote:
Originally Posted by [RAZ
ADreNaLiNe-DJ ]
Quote:
Originally Posted by [HUN
Peti ]
anyone else?
First of all, why don't you save player position each 5 seconds ?
Why not once per minute, it will take less cpu...

Secondly, memory leaks will be fixed in the next few days (v0.15).
Hmm
So U say I save one player's position and 5 seconds later another player's?
nop, instead saving each 5 seconds the position of the player try once per minute...
Ok understood
But I think the first post about HEAP is my friend to make it faster. I'll try it in the weekend and I'll post is it work or not.

Thanks for All!