memory usage of msgserver increasing over time which causes losing connection with db

07/19/2016 20:46 ManoLucky#1
i've 5095 p-server the gameserver lost connection with database after 2 hrs from starting it

The Error >>

PHP Code:
2016-7-14 16:17:52 -- ERRORDatabase ExecuteSQL(MySQL client run out of memoryoccur mysql error(SELECT FROM cq_tutor WHERE tutor_id 160840 AND Betrayal_flag 0).
2016-7-14 16:17:52 -- ERRORDatabase ExecuteSQL(Lost connection to MySQL server during queryoccur mysql error(SELECT FROM cq_tutor WHERE Student_id 160840 AND Betrayal_flag 0 LIMIT 1). 
the msgserver memory usage increases too fast over time i know the reason but i can't find solution

login action of players have many actions of type 1077 like that


PHP Code:
REPLACE INTO `cq_actionVALUES ('100000''00000000''00000000''1071''000000''1 200000');
REPLACE INTO `cq_actionVALUES ('200000''500000''100000''1077''50''select who FROM bigmano where weap1=%user_id');
REPLACE INTO `cq_actionVALUES ('300000''500000''100000''1077''50''select who FROM bigmano where weap2=%user_id');
REPLACE INTO `cq_actionVALUES ('400000''500000''100000''1077''50''select who FROM bigmano where weap3=%user_id');
REPLACE INTO `cq_actionVALUES ('500000''600000''100000''1077''50''select who FROM bigmano where weap4=%user_id'); 
This actions repeating itself every 1 second for all online players

that's just example i've many of that kind of actions starting with login action

i tried to convert my tables from MyIsam To InnoDB but the problem still occuring

i mean .. is there any solution to make msg server memory usage increase slower ?? like stoping caching or saving logs in game server or other way ?

i want to solve this problem without deleting actions if that possible

thanks for reading ,,
07/19/2016 21:06 angel12345#2
Your over using that actiontype opening so many Querys and never closing them thus causing the MYSQL service to crash. A solution is properly writing your querys. Read your error's specfically your out of memory.
07/19/2016 21:55 ManoLucky#3
Quote:
Originally Posted by angel12345 View Post
Your over using that actiontype opening so many Querys and never closing them thus causing the MYSQL service to crash. A solution is properly writing your query. Read your error's specfically your out of memory.
thanks for replying but i think it isn't mysql crashing ... the msg server memory usage still increasing until the total memory usage become 100 % ( No Physical Memory Available ) and commit charge (Task Manager) become more than 80% which cause losing connection between database and gameserver cuz there isn't more memory available ... do u think there's any solution except deleting actions ?
07/19/2016 22:25 pro4never#4
Quote:
Originally Posted by ManoLucky View Post
thanks for replying but i think it isn't mysql crashing ... the msg server memory usage still increasing until the total memory usage become 100 % ( No Physical Memory Available ) and commit charge (Task Manager) become more than 80% which cause losing connection between database and gameserver cuz there isn't more memory available ... do u think there's any solution except deleting actions ?


The solution is to not use TQ binaries. They are full of huge exploits that lets anyone who wants to crash your server, delete your database, etc. That's not even mentioning the fact that they are highly illegal and don't let you actually do much in terms of client protection or add custom features.
07/19/2016 22:52 angel12345#5
Quote:
Originally Posted by pro4never View Post
The solution is to not use TQ binaries. They are full of huge exploits that lets anyone who wants to crash your server, delete your database, etc. That's not even mentioning the fact that they are highly illegal and don't let you actually do much in terms of client protection or add custom features.
Indeed but if he wishes to use them at least realize the problem isn't his system but an issue with how the binaries run the SQL Statements.