|
You last visited: Today at 11:47
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.
02/07/2011, 22:20
|
#1
|
elite*gold: 0
Join Date: Apr 2006
Posts: 231
Received Thanks: 94
|
MySql Error. Buffer Maxing Out?
After I recoded my mysql system, I have been getting a weird ass mysql error after around 6-7 hours typically. After I get the error my mysql fails (wont let me reconnect) and I have to restart my dedi for the mysql to actually work again.
These are the errors:
Code:
MySql.Data.MySqlClient.MySqlException: Unable to connect to any of the specified MySQL hosts. ---> System.Net.Sockets.SocketException: An operation on a socket could not be performed because the system lacked sufficient buffer space or because a queue was full
at System.Net.Sockets.Socket.DoBeginConnect(EndPoint endPointSnapshot, SocketAddress socketAddress, LazyAsyncResult asyncResult)
at System.Net.Sockets.Socket.BeginConnect(EndPoint remoteEP, AsyncCallback callback, Object state)
at MySql.Data.Common.StreamCreator.CreateSocketStream(IPAddress ip, Int32 port, Boolean unix)
at MySql.Data.Common.StreamCreator.GetStream(UInt32 timeOut)
at MySql.Data.MySqlClient.NativeDriver.Open()
--- End of inner exception stack trace ---
at MySql.Data.MySqlClient.NativeDriver.Open()
at MySql.Data.MySqlClient.MySqlPool.CreateNewPooledConnection()
at MySql.Data.MySqlClient.MySqlPool.GetPooledConnection()
at MySql.Data.MySqlClient.MySqlPool.GetConnection()
at MySql.Data.MySqlClient.MySqlConnection.Open()
at ConquerSx.Database.MySqlReader.TryFill(MySqlCommand command) in C:\Users\Chris\Desktop\source\source\Database\MySqlReader.cs:line 72
at ConquerSx.Database.MySqlReader..ctor(MySqlCommand command) in C:\Users\Chris\Desktop\source\source\Database\MySqlReader.cs:line 19
at ConquerSx.Database.Core.Loadconfig() in C:\Users\Chris\Desktop\source\source\Database\Core.cs:line 11
at ConquerSx.Program.Main(String[] args) in C:\Users\Chris\Desktop\source\source\Program.cs:line 85
Saved.
I dont really need a step by step explanation, just need to know what can cause this error so i can fix it. I searched google, but it actually failed me for once. Anyone have any ideas on why the buffer is maxing?
FYI: The mysql system creates a new connection every query, and closes it right after. Figured this may be causing some of the problem, but I watched the mysql monitor and it stays below 30 connections.
|
|
|
02/07/2011, 22:25
|
#2
|
elite*gold: 0
Join Date: Nov 2010
Posts: 1,162
Received Thanks: 370
|
ConquerSx explains it all.
|
|
|
02/07/2011, 22:27
|
#3
|
elite*gold: 0
Join Date: May 2006
Posts: 1,190
Received Thanks: 516
|
Quote:
Originally Posted by stealarcher
After I recoded my mysql system, I have been getting a weird ass mysql error after around 6-7 hours typically. After I get the error my mysql fails (wont let me reconnect) and I have to restart my dedi for the mysql to actually work again.
These are the errors:
Code:
MySql.Data.MySqlClient.MySqlException: Unable to connect to any of the specified MySQL hosts. ---> System.Exception: Exception of type 'System.Exception' was thrown.
at MySql.Data.MySqlClient.NativeDriver.Open()
--- End of inner exception stack trace ---
at MySql.Data.MySqlClient.NativeDriver.Open()
at MySql.Data.MySqlClient.MySqlPool.CreateNewPooledConnection()
at MySql.Data.MySqlClient.MySqlPool.GetPooledConnection()
at MySql.Data.MySqlClient.MySqlPool.GetConnection()
at MySql.Data.MySqlClient.MySqlConnection.Open()
at ConquerSx.Database.MySqlReader.TryFill(MySqlCommand command) in C:\Users\Chris\Desktop\source\source\Database\MySqlReader.cs:line 72
at ConquerSx.Database.MySqlReader..ctor(MySqlCommand command) in C:\Users\Chris\Desktop\source\source\Database\MySqlReader.cs:line 19
at ConquerSx.Database.Core.Loadconfig() in C:\Users\Chris\Desktop\source\source\Database\Core.cs:line 11
at ConquerSx.Program.Main(String[] args) in C:\Users\Chris\Desktop\source\source\Program.cs:line 85
ServerIP: 64.74.97.228
ServerIP: 64.74.97.228
System.NullReferenceException: Object reference not set to an instance of an object.
at ConquerSx.PacketHandling.PickItemUp.Handle(GameClient GC, Byte[] Data) in C:\Users\Chris\Desktop\source\source\PacketHandling\PickItemUp.cs:line 15
at ConquerSx.PacketHandler.Handle(GameClient GC, Byte[] PData) in C:\Users\Chris\Desktop\source\source\PacketHandler.cs:line 651
System.NullReferenceException: Object reference not set to an instance of an object.
at ConquerSx.Database.MySqlReader.Read() in C:\Users\Chris\Desktop\source\source\Database\MySqlReader.cs:line 94
at ConquerSx.Database.items.NewItem(Item Item, UInt32 PlayerEntityID) in C:\Users\Chris\Desktop\source\source\Database\items.cs:line 71
Saved.
I dont really need a step by step explanation, just need to know what can cause this error so i can fix it. I searched google, but it actually failed me for once. Anyone have any ideas on why the buffer is maxing?
FYI: The mysql system creates a new connection every query, and closes it right after. Figured this may be causing some of the problem, but I watched the mysql monitor and it stays below 30 connections.
|
Just an idea and not really helping with the error, but why don't you have 1 constant open connection to MySql and then send everything through that instead of opening up new connections all the time... Less Stress = Less Lag = Better Server
Because in all honesty you will run into alot of problems when you have more than 10 people trying to connect...
You have to think.. each query = 1 MySql connection... If 50 people log in and then do something that needs a save, thats 50+ MySql connections opening and then opening again to save something else...
Just seems a bit errr "Stupid" to have your MySql like that < Not meaning to flame
As for the Buffer Maxing out I have never seen that error before so unfortunatly can't help you out buddy
|
|
|
02/07/2011, 22:28
|
#4
|
elite*gold: 0
Join Date: Apr 2006
Posts: 231
Received Thanks: 94
|
Well, ive always heard of mysql timing out crashing etc, and this way i figured it couldnt do that rofl.
|
|
|
02/07/2011, 22:29
|
#5
|
elite*gold: 0
Join Date: May 2006
Posts: 1,190
Received Thanks: 516
|
Quote:
Originally Posted by stealarcher
Well, ive always heard of mysql timing out crashing etc, and this way i figured it couldnt do that rofl.
|
Yeah but this way you are more likely to flood the MySql connections and then max out the pool and crash the server that way
|
|
|
02/07/2011, 22:31
|
#6
|
elite*gold: 0
Join Date: Apr 2006
Posts: 231
Received Thanks: 94
|
hmm, may be right, ill try it out with a solid connection and see how it goes then.
|
|
|
02/08/2011, 08:24
|
#7
|
elite*gold: 0
Join Date: Nov 2010
Posts: 1,162
Received Thanks: 370
|
Why don't you just use Immunes or Impulse MySQL?
|
|
|
02/08/2011, 10:26
|
#8
|
elite*gold: 0
Join Date: Mar 2008
Posts: 555
Received Thanks: 99
|
u cant download Impulse's source anymore the download was removed
|
|
|
02/08/2011, 12:12
|
#9
|
elite*gold: 0
Join Date: May 2006
Posts: 1,190
Received Thanks: 516
|
Actually you can download the source, if you go down the first page on the thread then you will see alot of download links.
|
|
|
02/08/2011, 13:31
|
#10
|
elite*gold: 0
Join Date: Nov 2010
Posts: 1,162
Received Thanks: 370
|
Quote:
Originally Posted by coreymills
u cant download Impulse's source anymore the download was removed
|
Also he posted the way he handle MySQL if you look in a thread here on first page.
|
|
|
02/08/2011, 15:01
|
#11
|
elite*gold: 0
Join Date: Apr 2006
Posts: 231
Received Thanks: 94
|
I believe impulses source creates a new connection each query as well. He uses using (connection) which disposes it and creates it, and opens it every time. Forgive me if im wrong, but im pretty sure it does.
|
|
|
02/08/2011, 16:23
|
#12
|
elite*gold: 0
Join Date: May 2006
Posts: 1,190
Received Thanks: 516
|
Quote:
Originally Posted by stealarcher
I believe impulses source creates a new connection each query as well. He uses using (connection) which disposes it and creates it, and opens it every time. Forgive me if im wrong, but im pretty sure it does.
|
No Impulse uses a "solid" connection
It open up when the source does and stays open and sends everything through that connection...
|
|
|
02/08/2011, 18:18
|
#13
|
elite*gold: 0
Join Date: Apr 2006
Posts: 231
Received Thanks: 94
|
Hmm, i looked through his source. it calls a void called SelectConnection, which gets the mysql connection. In the mysql connection its set to return new. Isnt that creating a "new" connection every time the SelectConnection is called?
|
|
|
02/08/2011, 18:20
|
#14
|
elite*gold: 20
Join Date: Mar 2006
Posts: 6,126
Received Thanks: 2,518
|
Yes it is, and theres nothing really wrong with creating a new connection everytime you need one, the majority of websites work in this fashion.
|
|
|
02/08/2011, 18:26
|
#15
|
elite*gold: 0
Join Date: Apr 2006
Posts: 231
Received Thanks: 94
|
@Korvacs
Yeah, thats what I was thinking. I didnt think there was anything wrong with it, and figured it would prevent the connection from timing out etc that way. But sense this error isnt caused by too many connections obviously. Any idea what causes it?
|
|
|
 |
|
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 +1. The time now is 11:48.
|
|