From 6309fcc5b4b42102b5bb901dbbdf44846f5643f2 Mon Sep 17 00:00:00 2001 From: John Hurliman Date: Mon, 2 Nov 2009 11:19:55 -0800 Subject: Reverting the memory leak patch for MySQL. Problems have been reported with the grid server after running for several hours --- OpenSim/Data/MySQL/MySQLFramework.cs | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) (limited to 'OpenSim/Data/MySQL/MySQLFramework.cs') diff --git a/OpenSim/Data/MySQL/MySQLFramework.cs b/OpenSim/Data/MySQL/MySQLFramework.cs index ccd1ab0..fd428ae 100644 --- a/OpenSim/Data/MySQL/MySQLFramework.cs +++ b/OpenSim/Data/MySQL/MySQLFramework.cs @@ -40,10 +40,6 @@ namespace OpenSim.Data.MySQL /// public class MySqlFramework { - private static readonly log4net.ILog m_log = - log4net.LogManager.GetLogger( - System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - protected MySqlConnection m_Connection; protected MySqlFramework(string connectionString) @@ -73,11 +69,12 @@ namespace OpenSim.Data.MySQL } catch (MySqlException e) { - m_log.Error(e.Message, e); +Console.WriteLine(e.ToString()); if (errorSeen) throw; // This is "Server has gone away" and "Server lost" + // if (e.Number == 2006 || e.Number == 2013) { errorSeen = true; @@ -96,7 +93,7 @@ namespace OpenSim.Data.MySQL } catch (Exception e) { - m_log.Error(e.Message, e); +Console.WriteLine(e.ToString()); return 0; } } @@ -113,11 +110,11 @@ namespace OpenSim.Data.MySQL return cmd.ExecuteReader(); } - protected void CloseDBConnection(IDataReader reader, MySqlCommand cmd) + protected void CloseReaderCommand(MySqlCommand cmd) { - reader.Close(); cmd.Connection.Close(); cmd.Connection.Dispose(); + cmd.Dispose(); } } } -- cgit v1.1 From de71d23e145de5df080f5a9abfebb367b81b2527 Mon Sep 17 00:00:00 2001 From: John Hurliman Date: Mon, 2 Nov 2009 11:54:39 -0800 Subject: Removing Console.WriteLine()s that were brought in with the revert --- OpenSim/Data/MySQL/MySQLFramework.cs | 2 -- 1 file changed, 2 deletions(-) (limited to 'OpenSim/Data/MySQL/MySQLFramework.cs') diff --git a/OpenSim/Data/MySQL/MySQLFramework.cs b/OpenSim/Data/MySQL/MySQLFramework.cs index fd428ae..fca0ca5 100644 --- a/OpenSim/Data/MySQL/MySQLFramework.cs +++ b/OpenSim/Data/MySQL/MySQLFramework.cs @@ -69,7 +69,6 @@ namespace OpenSim.Data.MySQL } catch (MySqlException e) { -Console.WriteLine(e.ToString()); if (errorSeen) throw; @@ -93,7 +92,6 @@ Console.WriteLine(e.ToString()); } catch (Exception e) { -Console.WriteLine(e.ToString()); return 0; } } -- cgit v1.1