MySQL: Huge memory usage! -
Tee - 04.08.2011
Well, recently I converted my server from dini to MySQL, while on dini, it usually used like 7.5 % Memory with about 16 or more players. Now it gradually goes up till about 111% of Memory. I opened a support ticket and the representative said that it's a possible leak. I've free'd all the results after using mysql_store_result. I can't see where in my script it's causing a leek. I'd be glad if anyone could help me with this problem. There are some pictures below of what it looks like
Oh by the way it's Volt-Host.
Re: MySQL: Huge memory usage! -
MadeMan - 04.08.2011
It's hard to help without seeing the code.
Re: MySQL: Huge memory usage! -
FireCat - 04.08.2011
Are you sure thats the MySQL fault?
Re: MySQL: Huge memory usage! -
Calgon - 04.08.2011
You need to be more specific, if you think it's MySQL - you should at the very least point out which plugin you're using.
Re: MySQL: Huge memory usage! -
Tee - 04.08.2011
Quote:
Originally Posted by MadeMan
It's hard to help without seeing the code.
|
My code is 19,771 lines and I know you won't steal it if I post it but there will be other culprits. But maybe you can tell me what I might be doing wrong to make it use so much memory; I've read ******' optimization topic over and over.
Quote:
Originally Posted by Calg00ne
You need to be more specific, if you think it's MySQL - you should at the very least point out which plugin you're using.
|
G-sTyLeZzZ's MySQL R5 plugin.
Re: MySQL: Huge memory usage! -
iggy1 - 04.08.2011
Put this in your code and post the results.
It will create a txt file named "debug" in your server directory. You might be able to fix it with that information by yourself.
Re: MySQL: Huge memory usage! -
Tee - 04.08.2011
I did that and it said the result has been free'd.
Re: MySQL: Huge memory usage! -
iggy1 - 04.08.2011
Then you need to provide more information, or people are just stabbing in the dark. If you have free'd all results i can't see it being a mem leak from mysql. I'm not sure but i don't think there is any other function in that plugin that uses dynamic memory - that the user has to free.
Re: MySQL: Huge memory usage! -
Tee - 04.08.2011
Hmm, i'll look through my script and the debug again.
Re: MySQL: Huge memory usage! -
MadeMan - 04.08.2011
(I happened to saw the code you posted before)
pawn Код:
if(mysql_num_rows() != 0)
if mysql_num_rows() is not 0, you will free the result, but what if it is 0 ?