* Print out exception information when a mysql asset fetch fails
* Attempt reconnection on fetch and create exceptions.ThreadPoolClientBranch
parent
ce07854a45
commit
dee0d1e55d
|
@ -95,9 +95,12 @@ namespace OpenSim.Framework.Data.MySQL
|
||||||
cmd.Dispose();
|
cmd.Dispose();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (Exception)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
MainLog.Instance.Warn("ASSETS", "MySql failure fetching asset");
|
MainLog.Instance.Error(
|
||||||
|
"ASSETS", "MySql failure fetching asset" + Environment.NewLine + e.ToString()
|
||||||
|
+ Environment.NewLine + "Attempting reconnection");
|
||||||
|
_dbConnection.Reconnect();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return asset;
|
return asset;
|
||||||
|
@ -112,6 +115,8 @@ namespace OpenSim.Framework.Data.MySQL
|
||||||
_dbConnection.Connection);
|
_dbConnection.Connection);
|
||||||
|
|
||||||
// need to ensure we dispose
|
// need to ensure we dispose
|
||||||
|
try
|
||||||
|
{
|
||||||
using (cmd)
|
using (cmd)
|
||||||
{
|
{
|
||||||
MySqlParameter p = cmd.Parameters.Add("?id", MySqlDbType.Binary, 16);
|
MySqlParameter p = cmd.Parameters.Add("?id", MySqlDbType.Binary, 16);
|
||||||
|
@ -127,6 +132,14 @@ namespace OpenSim.Framework.Data.MySQL
|
||||||
cmd.Dispose();
|
cmd.Dispose();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
MainLog.Instance.Error(
|
||||||
|
"ASSETS", "MySql failure creating asset" + Environment.NewLine + e.ToString()
|
||||||
|
+ Environment.NewLine + "Attempting reconnection");
|
||||||
|
_dbConnection.Reconnect();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public void UpdateAsset(AssetBase asset)
|
public void UpdateAsset(AssetBase asset)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue