Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Question
Wednesday, June 15, 2016 8:25 PM
Looking for some ideas on further troubleshooting and remediation.
line 79:
var spdata = db.Query("EXEC [dbo].[appMWRDataRange] @0, @1, @2, @3, @4, @5, @6, @7", amsid, eqid, theclient, dbid, tzoffset, locid, startfrom, endbefore);
System.ComponentModel.Win32Exception: The wait operation timed out
Generated: Wed, 15 Jun 2016 15:51:32 GMT
System.Web.HttpUnhandledException (0x80004005): Exception of type 'System.Web.HttpUnhandledException' was thrown. > System.Data.SqlClient.SqlException (0x80131904): Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding. > System.ComponentModel.Win32Exception (0x80004005): The wait operation timed out
at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
at System.Data.SqlClient.TdsParserStateObject.ReadSniError(TdsParserStateObject stateObj, UInt32 error)
at System.Data.SqlClient.TdsParserStateObject.ReadSniSyncOverAsync()
at System.Data.SqlClient.TdsParserStateObject.TryReadNetworkPacket()
at System.Data.SqlClient.TdsParserStateObject.TryPrepareBuffer()
at System.Data.SqlClient.TdsParserStateObject.TryReadByte(Byte& value)
at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
at System.Data.SqlClient.SqlDataReader.TryConsumeMetaData()
at System.Data.SqlClient.SqlDataReader.get_MetaData()
at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString)
at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, SqlDataReader ds)
at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean asyncWrite)
at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method)
at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method)
at System.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior behavior)
at System.Data.Common.DbCommand.ExecuteReader()
at WebMatrix.Data.Database.<QueryInternal>d__0.MoveNext()
at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
at WebMatrix.Data.Database.Query(String commandText, Object[] parameters)
at ASP._Page_Members_ExportMWR_cshtml.Execute() in c:\inetpub\advsite\wwwroot\Members\ExportMWR.cshtml:line 79
at System.Web.WebPages.WebPageBase.ExecutePageHierarchy()
at System.Web.WebPages.WebPage.ExecutePageHierarchy(IEnumerable`1 executors)
at System.Web.WebPages.WebPage.ExecutePageHierarchy()
at System.Web.WebPages.StartPage.RunPage()
at System.Web.WebPages.StartPage.ExecutePageHierarchy()
at System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage)
at System.Web.WebPages.WebPageHttpHandler.ProcessRequestInternal(HttpContextBase httpContext)
ClientConnectionId:087037ea-efe8-4ab4-9147-c9309480acb8
Error Number:-2,State:0,Class:11
at System.Web.WebPages.WebPageHttpHandler.HandleError(Exception e)
at System.Web.WebPages.WebPageHttpHandler.ProcessRequestInternal(HttpContextBase httpContext)
at System.Web.WebPages.WebPageHttpHandler.ProcessRequestInternal(HttpContext context)
at System.Web.WebPages.WebPageHttpHandler.ProcessRequest(HttpContext context)
at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
All replies (7)
Monday, June 20, 2016 2:31 AM âś…Answered
HI,
System.ComponentModel.Win32Exception: The wait operation timed out
It occurs when a memory request for query cannot be granted immediately due to other concurrent queries or memory pressure.
Please check the Maximum Server Memory (in MB) in SSMS, change it to the default value of 2147483647 MB, please check whether it can fix it.
Regards,
Angie
Thursday, June 16, 2016 7:59 AM
Usually this happens as a result of a query taking longer than the command timeout setting, which is 30 seconds by default. You can't alter the command timeout value when using the Database helper. It's not exposed as a configurable property.
Having said all that, your operation looks like a straightforward INSERT operation. It shouldn't take long to execute unless you are inserting into heavily indexed tables with a lot of data. I have read that executing 'exec sp_updatestats' against the database can help resolve the issue.
Thursday, June 16, 2016 12:17 PM
Line 79 is a stored procedure (sql express) with a query to retrieve records. It has a pivot and a cte based on a view.
The Connection Execution Timeout is set to 0, indicating it should wait indefinitely. It is SQL Server 12.0.2000
Where did you see the Insert?
Thursday, June 16, 2016 6:15 PM
Where did you see the Insert?
I inferred incorrectly on misreading the name of the procedure.
The Connection Execution Timeout is set to 0, indicating it should wait indefinitely
There's a connection timeout and a command execution timeout. How are you setting your timeout?
Friday, June 17, 2016 1:47 PM
Connection timeout 15
Execution timeout 0
Monday, June 20, 2016 12:26 PM
It was already configured like that.
Wednesday, October 16, 2019 12:44 PM
Is this issue fixed?