Register for your free account! | Forgot your password?

Go Back   elitepvpers > MMORPGs > Conquer Online 2 > CO2 Private Server
You last visited: Today at 22:49

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



MySql Error. Buffer Maxing Out?

Discussion on MySql Error. Buffer Maxing Out? within the CO2 Private Server forum part of the Conquer Online 2 category.

Reply
 
Old 02/08/2011, 18:38   #16


 
Korvacs's Avatar
 
elite*gold: 20
Join Date: Mar 2006
Posts: 6,125
Received Thanks: 2,518
Chances are that you arnt Disposing the connection after you are finshed with it and are simply closing it. Can you check that?
Korvacs is offline  
Old 02/08/2011, 21:18   #17
 
elite*gold: 0
Join Date: Oct 2009
Posts: 768
Received Thanks: 550
Use timeouts. MySQL can be configured to kill a connection after an interval. If you use a connection/query (I wouldn't do it if I was in your case)* then you should add a parameter like "Connection Lifetime=5", even if 5 is much, it will help you since not all connections are bad and don't want to close themselves, this lifetime will save you. Also to be sure you can configurate mysql to kill any connection after no communication was done in a time span you want. (Networking options -> wait_timeout).

I use mysql's pooling system and it works wonderfully, and I wouldn't do what you do because creating a conn/query takes a few milliseconds and overall in 1 second it might be a big amount of milliseconds if there are like 100 queries.
I tried to profile my server cpu timing and I could see that to create a mysql connection it takes about 30 ms as it also pings the server before returing the connection. If the ping doesn't get back then too many connections are already opened and it will throw an error(your error.)

Better set a timeout like 2 seconds or even 1. It might not be a good idea if you also got your website to do queries on the mysql directly but try it.

Quote:
Originally Posted by .Beatz View Post
No Impulse uses a "solid" connection

It open up when the source does and stays open and sends everything through that connection...
Actually no, you can use one solid connection to only execute queries that doesn't involve reading, but it's not my case. I am using 'using' statement as .NET has a nicely well done pooling system.

For stealarcher, 'using' statement doesn't dispose the connection, it keeps it into the pool until a timeout expires and it is disconnected.

By the way. Your server doesn't open thousands of connections now is because the pooling is on even if you don't want to. Add 'pooling=false' in your connectionstring if you don't want it.

I tried to make my own little mysql pool :S I failed because atm when I restart my server there are atleast 50 people who would login directly, and sincerely without mysql pooling, my plan failed. Better inform yourself about pooling. It will help you.
-impulse- is offline  
Thanks
1 User
Old 02/09/2011, 16:17   #18
 
stealarcher's Avatar
 
elite*gold: 0
Join Date: Apr 2006
Posts: 231
Received Thanks: 94
Quote:
Originally Posted by Korvacs View Post
Chances are that you arnt Disposing the connection after you are finshed with it and are simply closing it. Can you check that?
hmm, does it work around the same was as IDispose? where you have to implement your own void etc? I was under the impression that by using the "using" it already disposed it for me.
stealarcher is offline  
Old 02/09/2011, 16:24   #19


 
Korvacs's Avatar
 
elite*gold: 20
Join Date: Mar 2006
Posts: 6,125
Received Thanks: 2,518
Oh good, no thats fine that disposes correctly. Just wanted to rule that out.
Korvacs is offline  
Old 02/09/2011, 16:27   #20
 
stealarcher's Avatar
 
elite*gold: 0
Join Date: Apr 2006
Posts: 231
Received Thanks: 94
oh i see, np. And as for impulses solution, i tried to set the mysql timeout inside mysql settings to 3, and then restarted my mysql, let it run overnight, and i still ran into the same problem. I also set the connection timeout in the sql string itself. And i did disable pooling.
stealarcher is offline  
Old 02/09/2011, 18:39   #21
 
ImmuneOne's Avatar
 
elite*gold: 0
Join Date: Nov 2009
Posts: 754
Received Thanks: 544
Having one connection for multipile queries is really no problem. As long you have some sort of notification method for when the connection dies, that way you could open a new connection whenever your existing connection dies.
ImmuneOne is offline  
Old 02/09/2011, 23:47   #22
 
12tails's Avatar
 
elite*gold: 0
Join Date: Apr 2009
Posts: 773
Received Thanks: 441
for example if i check the connection before do any action, if the connection is killed i can start it again?? (just a question)
12tails is offline  
Old 02/10/2011, 00:29   #23
 
stealarcher's Avatar
 
elite*gold: 0
Join Date: Apr 2006
Posts: 231
Received Thanks: 94
As far as I know its about the same situation as sockets. Once a socket dies (not from intentional disconnection), you may have to start a completely new connection rather then just re-opening the current connection.
stealarcher is offline  
Old 02/10/2011, 18:37   #24
 
ImmuneOne's Avatar
 
elite*gold: 0
Join Date: Nov 2009
Posts: 754
Received Thanks: 544
Quote:
Originally Posted by 12tails View Post
for example if i check the connection before do any action, if the connection is killed i can start it again?? (just a question)
When using the ManagedOpenSsl library, you have an option to get the connection.StateChange raised whenever your MySql's connection's state has been changed.

Code:
connection.StateChange += new StateChangeEventHandler(connection_StateChange);

void connection_StateChanged(object sender, StateChangeEventArgs e)
{
//do whatever you want with e.CurrentState
}
ImmuneOne is offline  
Thanks
1 User
Old 02/11/2011, 18:13   #25
 
stealarcher's Avatar
 
elite*gold: 0
Join Date: Apr 2006
Posts: 231
Received Thanks: 94
#bump, still getting the same error. Tried reinstalling mysql thinking i may of changed some variables by accident, still didnt change anything.
stealarcher is offline  
Reply


Similar Threads Similar Threads
[ERROR] Mysql can't connect to local Mysql server through socket
11/06/2010 - Metin2 Private Server - 5 Replies
I just recently tried to configure a DNS server for MT2.. It came up with this error ERROR: 2002 (HY000): Can't connect to local Mysql server through socket '/tmp/mysql.sock' (2) Do I need to do a fresh installation of FBSD? :S Thanks.
ERROR in MySql
08/26/2010 - CO2 Private Server - 15 Replies
REPLACE INTO `cq_action` VALUES ('950000', '950001', '0000', '0101', '0', 'Hello~There~%user_name~Its~Casino~Time!'); REPLACE INTO `cq_action` VALUES ('950001', '15003', '0000', '0102', '0', 'Are~You~New? 950002'); REPLACE INTO `cq_action` VALUES ('950002', '950003', '0000', '0101', '0', 'Why~Yes~I~Am!~I've~Come~To~Make~You~Rich'); REPLACE INTO `cq_action` VALUES ('950003', '15003', '0000', '0102', '0', 'How~Do~I~Become~Rich? 950004'); REPLACE INTO `cq_action` VALUES ('950004', '950005',...
MySql Error
02/01/2010 - Metin2 Private Server - 5 Replies
Ich hab meinen Server neu gemacht, der Server ist on, und Portmap auch an, bei MySql kommt aber der Folgende Fehler: 2003 - Can't connect to MySQL server on '5.*25.*76.100' (10060) Und hier Als Bild: http://www.bilder-hochladen.net/files/am09-3.jpg ... Eingegeben Hab ich folgendes: Host Name/IP Adress: 5.*25.*76.100 Port: 3306 MFG LordPanik
[Help] Wamp error or mysql error
09/27/2009 - EO PServer Hosting - 1 Replies
Notice: Undefined variable: myaccount in C:\wamp\www\pages\register.php on line 17 Warning: mysql_select_db() : Connecting to 3.22, 3.23 & 4.0 is not supported. Server is 4.0.18-nt in C:\wamp\www\pages\register.php on line 17 Warning: mysql_select_db() : Connecting to 3.22, 3.23 & 4.0 servers is not supported in C:\wamp\www\pages\register.php on line 17 Warning: mysql_select_db() : A link to the server could not be established in C:\wamp\www\pages\register.php on line 17 Warning:...
mySQl error
06/27/2006 - Main - 5 Replies
waaaaaaaaah das kam grad als ich ins forum wollte



All times are GMT +2. The time now is 22:49.


Powered by vBulletin®
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2024 elitepvpers All Rights Reserved.