开发者

New Webform application using EF and EDS freezes IE ocasionally

开发者 https://www.devze.com 2023-02-12 18:28 出处:网络
I have a new ASP.Net 4.0 Webform application. It is written using Entity Framework 4.0 and it uses the EntityDataSource for about 90% of its Data Access (bound primarily to the ListView and DropDownLi

I have a new ASP.Net 4.0 Webform application. It is written using Entity Framework 4.0 and it uses the EntityDataSource for about 90% of its Data Access (bound primarily to the ListView and DropDownList controls).

The users are reporting ocassional IE "freezes". What seems to be happening is during a post back, IE will go completely White and the page is never rendered. The user can close IE and start it back up and the application is always fine.

It seems like I might be running into a resource issue. Either Server RAM, SQL RAM, SQL database connections, etc. There is nothing in the Event Log (except for the error today!) on the client PC or the server when this happens (and it seems to happen 1 - 3 times per day to random users).

Today, I had a user wait it out and got the error below (and it was also in the Event Log). I am not sure if this is the error the others are getting or if this is an unrelated error. The problem is, I am not on site. I can only access the server at night and like I said, there is nothing ibn any of the event logs. I thought about installing Spotlight on SQL (I have used it before, very nice) or some other SQL monitoring tool. First, I though I would see advice from the experts here on stack overflow.

Any advice? (Other than don't use the EntityDataSource! lol)

Oh yeah... here is that error I mentioned above:

Server Error in '/' Application.

Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.

Description: An unhandled exception o开发者_StackOverflow社区ccurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Data.SqlClient.SqlException: Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

[SqlException (0x80131904): Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.]

System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection) +404

System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning() +412

System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) +1363

System.Data.SqlClient.SqlDataReader.ConsumeMetaData() +58

System.Data.SqlClient.SqlDataReader.get_MetaData() +118

System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString) +6312385

System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async) +6313986

System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result) +538

System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method) +28

System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method) +256

System.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior behavior) +19

System.Data.EntityClient.EntityCommandDefinition.ExecuteStoreCommands(EntityCommand entityCommand, CommandBehavior behavior) +617

[EntityCommandExecutionException: An error occurred while executing the command definition. See the inner exception for details.]

System.Web.UI.WebControls.EntityDataSourceView.ExecuteSelect(DataSourceSelectArguments arguments) +1599

System.Web.UI.DataSourceView.Select(DataSourceSelectArguments arguments, DataSourceViewSelectCallback callback) +28

System.Web.UI.WebControls.DataBoundControl.PerformSelect() +274

System.Web.UI.WebControls.ListView.PerformSelect() +124

System.Web.UI.WebControls.BaseDataBoundControl.EnsureDataBound() +105

System.Web.UI.WebControls.ListView.CreateChildControls() +78

System.Web.UI.Control.EnsureChildControls() +182

System.Web.UI.Control.PreRenderRecursiveInternal() +60

System.Web.UI.Control.PreRenderRecursiveInternal() +222

System.Web.UI.Control.PreRenderRecursiveInternal() +222

System.Web.UI.Control.PreRenderRecursiveInternal() +222

System.Web.UI.Control.PreRenderRecursiveInternal() +222

System.Web.UI.Control.PreRenderRecursiveInternal() +222

System.Web.UI.Control.PreRenderRecursiveInternal() +222

System.Web.UI.Control.PreRenderRecursiveInternal() +222

System.Web.UI.Control.PreRenderRecursiveInternal() +222

System.Web.UI.Control.PreRenderRecursiveInternal() +222

System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +4185

Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.1


My suggestions:

  • Find if this happens on random or concrete page
  • Try to find how many users is accessing your web application when this happens (performance counters)
  • Monitor SQL server - performance, reads, also check long running transactions which can block other users reading
  • On your dev development check how many records your EntityDataSource returns - especially if you are using build in paging.
0

精彩评论

暂无评论...
验证码 换一张
取 消