We are terribly confused with a recurring error on our client's machine. I have a long running application that processes ~6million records over about 20 hours. On our dev environment locally everything works, the process completes successfully each day. On our client's machine, however, we continue to get a timeout.
The program simply uses a Parallel.Foreach
on each record to spawn a thread and process the record, performing a few queries and inserts.
In the client's sql log we are seeing:
2013-11-21 09:02:12.10 spid4s SQL Server has encountered 4 occurrence(s) of I/O requests taking longer than 15 seconds to complete on file [E:\Program Files...
2013-11-21 09:02:12.10 spid4s SQL Server has encountered 5 occurrence(s) of I/O requests taking longer than 15 seconds to complete on file [E:\Program Files...
2013-11-21 09:18:02.35 spid4s SQL Server has encountered 10 occurrence(s) of I/O requests taking longer than 15 seconds to complete on file [E:\Program Files...
In my C# application's log file I recieve the error:
------ERROR------
Time : 11/21/2013 9:05:14 AM
Source : .Net SqlClient Data Provider
Module : SqlInternalConnection
Method : Void OnError(System.Data.SqlClient.SqlException, Boolean)
Message : Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.
Occurring At :
at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning()
at System.Data.SqlClient.TdsParserStateObject.ReadSniError(TdsParserStateObject stateObj, UInt32 error)
at System.Data.SqlClient.TdsParserStateObject.ReadSni(DbAsyncResult asyncResult, TdsParserStateObject stateObj)
at System.Data.SqlClient.TdsParserStateObject.ReadNetworkPacket()
at System.Data.SqlClient.TdsParserStateObject.ReadByte()
at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString)
And in the few traces the client has been able to give us, nothing looks out of the ordinary, until the queries start timing out. We don't see a steady climb in query time or any noticable pattern.
We've added with (nolock)
to our queries to ensure we aren't deadlocking, even though the sql log didn't report any. The machine has 16GB of memory on it, and sql's max is set ~14GB.
Essentially I am wondering if anyone can assist me in beginning to locate the problem. It doesn't occur at the same time throughout the day, and never at the same record (between 200k and 1.5 million have been processed before a crash on different runs).