Inconsistent Exceptions: Unable to Connect and Timeout
Posted by:
Greg Wyatt
Date: February 07, 2013 09:17AM
Another one of these errors just occured inside of an application written in php. We now know that it is not a .Net Connector issue. With that said, if anyone would still like to read the problem and suggest were this question should be directed, I would greatly appreciate it. Also, intermittent network issues could cause this problem, but it is highly unlikely. So any advice/suggestions would be great.
My company's setup consists of Server 2008 R2 with IIS 7.5 installed. The .Net 4.5 framework has also been installed on the system. There are multiple sites running on the IIS server in different applications pools some are the 4.0 framework others are the 2.0 framework. We are using .Net connector 6.1.3 and MySQL server 5.1.44.
The issue is intermittent and does not always cause a complete failure. Also, the issue has occurred across all of the sites at various times. Sometimes the exceptions are being thrown and the system is logging it, but the user never experiences the failure.
The following is such an error where the user never experienced the failure.
Event code: 3005
Event message: An unhandled exception has occurred.
Event time: 2/7/2013 2:04:08 PM
Event time (UTC): 2/7/2013 2:04:08 PM
Event ID: 89afe0e933924603a6b6abe13d666095
Event sequence: 9
Event occurrence: 1
Event detail code: 0
Exception information:
Exception type: MySqlException
Exception message: Unable to connect to any of the specified MySQL hosts.
Thread information:
Thread ID: 12
Thread account name: IIS APPPOOL\--Pool’s Name-
Is impersonating: False
Stack trace: at MySql.Data.MySqlClient.NativeDriver.Open()
at MySql.Data.MySqlClient.Driver.Create(MySqlConnectionStringBuilder settings)
at MySql.Data.MySqlClient.MySqlPool.GetPooledConnection()
at MySql.Data.MySqlClient.MySqlPool.TryToGetDriver()
at MySql.Data.MySqlClient.MySqlPool.GetConnection()
at MySql.Data.MySqlClient.MySqlConnection.Open()
at System.Data.Common.DbDataAdapter.QuietOpen(IDbConnection connection, ConnectionState& originalState)
at System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, String srcTable)
at System.Web.UI.WebControls.SqlDataSourceView.ExecuteSelect(DataSourceSelectArguments arguments)
at System.Web.UI.DataSourceView.Select(DataSourceSelectArguments arguments, DataSourceViewSelectCallback callback)
at System.Web.UI.WebControls.DataBoundControl.PerformSelect()
at Home.Page_Load(Object sender, EventArgs e) in e:\Websites\ProsperTechnologiesManagement\Home.aspx.cs:line 32
at System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e)
at System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e)
at System.Web.UI.Control.OnLoad(EventArgs e)
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
At other times, this error along with others will cause the site to actually crash for the user. The following are some of the errors we have been experiencing again intermittently.
Event code: 3005
Event message: An unhandled exception has occurred.
Event time: 1/30/2013 11:55:01 AM
Event time (UTC): 1/30/2013 11:55:01 AM
Event ID: f3ee7e16ef3e432d9e25c2f5f52e53e8
Event sequence: 823
Event occurrence: 3
Event detail code: 0
Exception information:
Exception type: MySqlException
Exception message: Fatal error encountered during command execution.
at MySql.Data.MySqlClient.MySqlCommand.ExecuteReader(CommandBehavior behavior)
at MySql.Data.MySqlClient.MySqlCommand.ExecuteNonQuery()
at Prosper.PTLog.PTLog.Write(String productId, String user, String connectionString, Int32 eventCode, String[] infoItems)
at Prosper.PTLog.PTLog.Write(String productId, String user, Int32 eventCode, String[] eventItems)
at ptchart.Page_Load(Object sender, EventArgs e) in e:\Websites\InsightCenter\widget\ptchart.aspx.cs:line 21
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.
at MySql.Data.MySqlClient.MySqlDataReader.NextResult()
at MySql.Data.MySqlClient.MySqlCommand.ExecuteReader(CommandBehavior behavior)
Lastly, I have included the following error although I am not sure it is related to the rest of them. Sometimes when the config file is loading it chokes on loading the MySQL role provider. It is not specifically mentioned in the trace below, but when I inspected the web.config file that was the line that it was failing on.
Event code: 3008
Event message: A configuration error has occurred.
Event time: 2/6/2013 8:30:59 PM
Event time (UTC): 2/6/2013 8:30:59 PM
Event ID: a5069920119d477e80fbf1849ec49e5d
Event sequence: 10
Event occurrence: 6
Event detail code: 0
Exception information:
Exception type: ConfigurationErrorsException
Exception message: Unable to initialize provider. Missing or incorrect schema. (--Sites reference--\web.con line 38)
Thread information:
Thread ID: 12
Thread account name: IIS APPPOOL\--Pool’s Name----
Is impersonating: False
Stack trace: at System.Web.Security.Roles.Initialize()
at System.Web.Security.RoleManagerModule.OnEnter(Object source, EventArgs eventArgs)
at System.Web.HttpApplication.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
I am really at a loss as to why this is happening, why it works the majority of the time, and why when it does fail it only causes the site to crash some of the time.
Any thoughts are much appreciated.
Edited 2 time(s). Last edit at 02/07/2013 10:57AM by Greg Wyatt.