几天前我注意到我的Web应用程序给了我一个异常超时到期的SQL.
我清理了几个存储过程,花了更多的CPU并重新启动SQL Server服务,我的应用程序开始工作,因为它是在快速和没有任何延迟之前.三四个小时后我再次检查它,我无法加载一个页面,而不是它给我的异常超时到期.我检查过服务器CPU是好的一切看起来很好.我在同一个IIS 7下有一些其他网站,它们运行良好,没有任何例外.我再次重新启动SQL Server服务,我的应用程序再次恢复正常.我认为它看起来像SQL服务器数据库上的问题,但我不知道如何解决它.
因此,每当我遇到异常时,我只是重启sql服务,但当然这不是最好的方法.请帮我解决这个问题.
这是我得到的一个例外.
消息:抛出了类型'System.Web.HttpUnhandledException'的异常.来源:System.Web内部异常:System.Data.UpdateException:更新条目时发生错误.有关详细信息,请参阅InnerException.---> System.Data.SqlClient.SqlException:超时已过期.操作完成之前经过的超时时间或服务器没有响应.该语句已终止.在System.Data.SqlClient.SqlConnection.OnError(SqlException异常,布尔breakConnection)在System.Data.SqlClient.SqlInternalConnection.OnError(SqlException异常,布尔breakConnection)在System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)在系统System.Data.SqlClient上的System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds,RunBehavior runBehavior,String resetOptionsString)中的.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior,SqlCommand cmdHandler,SqlDataReader dataStream,BulkCopySimpleResultSet bulkCopyHandler,TdsParserStateObject stateObj) System.Data.SqlClient上的System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior,RunBehavior runBehavior,Boolean returnStream,String方法,DbAsyncResult结果)中的.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior,RunBehavior runBehavior,Boolean returnStream,Boolean async). SqlCommand.InternalExecuteNonQuery(DbAsyncResult结果,Str ING方法名,布尔sendToPipe)在System.Data.SqlClient.SqlCommand.ExecuteNonQuery()在System.Data.Mapping.Update.Internal.DynamicUpdateCommand.Execute(UpdateTranslator翻译,EntityConnection连接,字典
2 identifierValues, List1 generatedValues)在System.Data.Mapping. Update.Internal.UpdateTranslator.Update(IEntityStateManager stateManager,IEntityAdapter adapter)---内部异常堆栈跟踪结束---在System的System.Data.Mapping.Update.Internal.UpdateTranslator.Update(IEntityStateManager stateManager,IEntityAdapter适配器). Data.EntityClient.EntityAdapter.Update(IEntityStateManager entityCache)在System.Data.Objects.ObjectContext.SaveChanges(布尔acceptChangesDuringSave)在System.Data.Objects.ObjectContext.SaveChanges()在BCSCDomain.Domain.DataLayer.OtherDataLayer.UpdateHitCounter(的Int32 hlistid ,Int32 hcounterid)在BuyCarandSellCar.UsedCarProfilePage.HitCounter()at BuyCarandSellCar.UsedCarProfilePage.Page_Load(Object sender,EventArgs e)at System.Web.Util.CalliHelpe r.EventArgFunctionCaller(IntPtr的FP,对象O,对象吨,EventArgs e)上System.Web.Util.CalliEventHandlerDelegateProxy.Callback(对象发件人,EventArgs e)上在系统System.Web.UI.Control.OnLoad(EventArgs的发送). Web.UI.Control.LoadRecursive()在System.Web.UI.Page.ProcessRequestMain(布尔includeStagesBeforeAsyncPoint,布尔includeStagesAfterAsyncPoint)堆栈跟踪:在System.Web.UI.Page.HandleError(例外e)上的System.Web.UI. System.Web.UI.Page.ProcessRequestWithNoAssert上的System.Web.UI.Page.ProcessRequest()处的System.Web.UI.Page.ProcessRequest(布尔includeStagesBeforeAsyncPoint,布尔includeStagesAfterAsyncPoint)的Page.ProcessRequestMain(布尔includeStagesBeforeAsyncPoint,布尔includeStagesAfterAsyncPoint)位于c:\ Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root中的ASP.usedcarlistings_profilepage_aspx.ProcessRequest(HttpContext context)中的System.Web.UI.Page.ProcessRequest(HttpContext context)上的HttpContext上下文\ 79794658\835d6695\App_Web_k mrmpdbb.16.cs:在System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()在System.Web.HttpApplication.ExecuteStep(IExecutionStep步骤,布尔逻辑completedSynchronously)线0