使用 EF 和 EDS 的新 Webform 应用程序偶尔会冻结 IE
我有一个新的 ASP.Net 4.0 Webform 应用程序。它是使用 Entity Framework 4.0 编写的,并且使用 EntityDataSource 进行大约 90% 的数据访问(主要绑定到 ListView 和 DropDownList 控件)。
用户报告 IE 偶尔“冻结”。似乎发生的情况是在回发期间,IE 将完全变成白色,并且页面永远不会呈现。用户可以关闭 IE 并重新启动它,应用程序始终正常。
看来我可能遇到了资源问题。服务器 RAM、SQL RAM、SQL 数据库连接等。发生这种情况时(似乎每天发生 1 - 3 次),客户端 PC 或服务器上的事件日志中没有任何内容(除了今天的错误!)随机用户)。
今天,我让一个用户等待并收到以下错误(并且它也在事件日志中)。我不确定这是否是其他人遇到的错误,或者这是否是不相关的错误。问题是我不在现场。我只能在晚上访问服务器,就像我说的,没有任何事件日志。我考虑过在 SQL 上安装 Spotlight(我以前用过,非常好)或者其他一些 SQL 监控工具。首先,我想我会在这里看到专家关于堆栈溢出的建议。
有什么建议吗? (除了不要使用 EntityDataSource!哈哈)
哦,是的...这是我上面提到的错误:
“/”应用程序中的服务器错误。
超时已过。超时时间 完成前已过去 操作或服务器不 回复。
描述:未处理的异常 执行期间发生的 当前的网络请求。请查看 堆栈跟踪以获取有关的更多信息 错误及其起源 代码。
异常详细信息: System.Data.SqlClient.SqlException: 超时已过。超时时间 完成之前已过去 操作或服务器不 回复。
来源错误:
生成了未处理的异常 当前执行期间 网络请求。有关信息 异常的起源和地点 可以使用异常来识别 下面的堆栈跟踪。
堆栈跟踪:
[SqlException (0x80131904):超时 已到期。超时时间已过 在操作完成之前 或者服务器没有响应。]
System.Data.SqlClient.SqlConnection.OnError(SqlException 异常,布尔中断连接) +404
System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning() +412
System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior、SqlCommand cmdHandler、 SqlDataReader数据流, 批量复制简单结果集 批量复制处理程序、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,字符串 重置选项字符串)+6312385
System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, 布尔返回流、布尔异步) +6313986
System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, 布尔returnStream,字符串方法, DbAsyncResult 结果)+538
System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, 布尔returnStream,字符串方法) +28
System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior 行为,字符串方法)+256
System.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior 行为)+19
System.Data.EntityClient.EntityCommandDefinition.ExecuteStoreCommands(EntityCommand 实体命令、命令行为 行为)+617
[EntityCommandExecutionException:一个 执行时发生错误 命令定义。看内在 详细信息例外。]
System.Web.UI.WebControls.EntityDataSourceView.ExecuteSelect(DataSourceSelectArguments 参数)+1599
System.Web.UI.DataSourceView.Select(DataSourceSelectArguments 论据, DataSourceViewSelectCallback回调) +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(布尔值 includeStagesBeforeAsyncPoint,布尔值 includeStagesAfterAsyncPoint) +4185
版本信息:Microsoft .NET 框架版本:4.0.30319;网络平台 版本:4.0.30319.1
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
occurred 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)
+404System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning()
+412System.Data.SqlClient.TdsParser.Run(RunBehavior
runBehavior, SqlCommand cmdHandler,
SqlDataReader dataStream,
BulkCopySimpleResultSet
bulkCopyHandler, TdsParserStateObject
stateObj) +1363System.Data.SqlClient.SqlDataReader.ConsumeMetaData()
+58System.Data.SqlClient.SqlDataReader.get_MetaData()
+118System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader
ds, RunBehavior runBehavior, String
resetOptionsString) +6312385System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior
cmdBehavior, RunBehavior runBehavior,
Boolean returnStream, Boolean async)
+6313986System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior
cmdBehavior, RunBehavior runBehavior,
Boolean returnStream, String method,
DbAsyncResult result) +538System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior
cmdBehavior, RunBehavior runBehavior,
Boolean returnStream, String method)
+28System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior
behavior, String method) +256System.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior
behavior) +19System.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) +1599System.Web.UI.DataSourceView.Select(DataSourceSelectArguments
arguments,
DataSourceViewSelectCallback callback)
+28System.Web.UI.WebControls.DataBoundControl.PerformSelect()
+274System.Web.UI.WebControls.ListView.PerformSelect()
+124System.Web.UI.WebControls.BaseDataBoundControl.EnsureDataBound()
+105System.Web.UI.WebControls.ListView.CreateChildControls()
+78System.Web.UI.Control.EnsureChildControls()
+182System.Web.UI.Control.PreRenderRecursiveInternal()
+60System.Web.UI.Control.PreRenderRecursiveInternal()
+222System.Web.UI.Control.PreRenderRecursiveInternal()
+222System.Web.UI.Control.PreRenderRecursiveInternal()
+222System.Web.UI.Control.PreRenderRecursiveInternal()
+222System.Web.UI.Control.PreRenderRecursiveInternal()
+222System.Web.UI.Control.PreRenderRecursiveInternal()
+222System.Web.UI.Control.PreRenderRecursiveInternal()
+222System.Web.UI.Control.PreRenderRecursiveInternal()
+222System.Web.UI.Control.PreRenderRecursiveInternal()
+222System.Web.UI.Page.ProcessRequestMain(Boolean
includeStagesBeforeAsyncPoint, Boolean
includeStagesAfterAsyncPoint) +4185Version Information: Microsoft .NET
Framework Version:4.0.30319; ASP.NET
Version:4.0.30319.1
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我的建议:
My suggestions: