System Timeout: on Postback

On server before this exception was not coming.. but from last 5-6 days it is coming, the code where this exception is thrown is running succesfully on local system, All other SQL Queries are executing well

var varInsertEmailSent = visadc.sp_Update_MailHistory(strCaseNo, intMilestoneid, struserid, intRoleId);

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.Exception: 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:

[Exception: Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.]
.btnsubmit_Click(Object sender, EventArgs e) in C:UsersDesktop...wfrmabc.aspx.cs:1849
System.Web.UI.WebControls.Button.OnClick(EventArgs e) +111
System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +110
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +10
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +36 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1565


As no help from anyone else so went deep into the issue.. i put a SQL Server Profiler on the Database... i tried to run the query again.. then in the event log i can see that one statement in my SP was taking time and after sometime it was abruptly getting aborted. so when researched i found that my column was not having a nonclustered index which was casuing to take a lot of time to run from client side.

You can also try to find this kind of problems by using profiler on diffrent SPs and RPCs to identify the prob and also to optimize the query Thank you

链接地址: http://www.djcxy.com/p/56686.html

上一篇: 超时过期SQL执行错误

下一篇: 系统超时:在回发