[MySQL]: How to avoid this ? - 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]: How to avoid this ? (
/showthread.php?tid=110900)
[MySQL]: How to avoid this ? -
Dreftas - 28.11.2009
I have big problem, so I will try to explain everything.
I have VPS(virtual private server) with 768MB ram, Linux CentOS.
My gamemode have ~25000 lines, uses G-sTyLeZzZ mysql plugin.
When server starts it uses ~20MB ram, but when server uptime is ~20 hours it uses ~180 MB RAM or more.
I think it's because of MySQL plugin. I made test on my home PC, and i know that with every mysql_get_field() function server uses some more KBytes of memory, after more and more mysql_get_field() it uses not KBytes, but MBytes, and that's why it uses so much RAM. Question: Is it possible to avoid somehow this ? Maybe you can suggest me something, because this problem is very annoying :/ On same VPS there is apache/mysql/cs server/sa-mp server and today, 4th time server had 0MB of ram free.. :/
P.S. I create topic here, because i think that i will get help faster here, not in plugin topic.
Re: [MySQL]: How to avoid this ? -
woot - 28.11.2009
mysql_free_result()
^ I don't know how or when exactly to use it, but it does free memory from recent queries or w/e.
Re: [MySQL]: How to avoid this ? -
Dreftas - 28.11.2009
Quote:
Originally Posted by //exora
mysql_free_result()
^ I don't know how or when exactly to use it, but it does free memory from recent queries or w/e.
|
When i was testint memory usage in that query after all mysql_get_field() i used function mysql_free_result() but memory use still increased, but i will try to put this function everywhere where it needs to be.
Re: [MySQL]: How to avoid this ? -
Dreftas - 28.11.2009
I used mysql_free_result() and still see a ram usage growing after every mysql_get_field :/
Any suggestions ?
Re: [MySQL]: How to avoid this ? -
Dreftas - 29.11.2009
No one knows?
I really need some issue for this