Error After Upgrade - Attachments - "Error writing chunk of attachment. Error while preforming query."

I get the following error when trying to attach a file to any business object in both the desktop and web client.

"Error writing chunk of attachment.  Error while preforming query."

My application server is on a separate server from my SQL database server. This error is not occurring on my test or sandbox server which share the same database server as production.

Here are the errors found in the logs of the production application server.

ERROR #1

 

Thread: Thread_14

Message: CorrelationID=9434d2a1569f8f40d4ae5c44bfa2427151e564967f

The correlationID of this exception is '9434d2a1569f8f40d4ae5c44bfa2427151e564967f'. Exception occured while runnging query for SqlServerEngineSpecificHelper::WriteNextAttachmentChunkForVarBinaryMaxField. The text of the Query was 'UPDATE [dbo].[TrebuchetAttach] SET FileContents .WRITE(@P1,@P2,@P3) WHERE (RecID = @P4)'.

Exception:

[System.Data.SqlClient.SqlException] Execution Timeout Expired.  The timeout period elapsed prior to completion of the operation or the server is not responding.

   at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)

   at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)

   at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)

   at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString, Boolean isInternal, Boolean forDescribeParameterEncryption)

   at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, Boolean inRetry, SqlDataReader ds, Boolean describeParameterEncryptionRequest)

Inner exc:

[System.ComponentModel.Win32Exception] The wait operation timed out [Stack trace not available.]

 

Error #2

 

Thread: Thread_14

Message: Error writing chunk of attachment

Exception:

[Trebuchet.TrebuchetSqlDbException] Error while performing query. See server logs for details. CorrelationID 9434d2a1569f8f40d4ae5c44bfa2427151e564967f.

   at Trebuchet.Database.BaseEngineHelper.BaseExecute[TReturn](Func`1 serviceExecFunc, String methodName, String queryText, String logQueryTypeMessage, String logMessageNameForResult, DebugCategory debuggerCategory)

   at Trebuchet.Database.BaseEngineHelper.RunExecuteNonQuery(IDbCommand command, String methodName)

   at Trebuchet.Database.SqlServerEngineSpecificHelper.WriteNextAttachmentChunkForVarBinaryMaxField(String strTableName, IDbConnection conn, BinaryChunkInfo info)

 

Error #3

 

Thread: Thread_14

Message: WCF exception

Exception:

[Trebuchet.TrebuchetDbException] Error writing chunk of attachment

   at Trebuchet.Database.SqlServerEngineSpecificHelper.WriteNextAttachmentChunkForVarBinaryMaxField(String strTableName, IDbConnection conn, BinaryChunkInfo info)

   at Trebuchet.Database.SqlServerEngineSpecificHelper.WriteFirstAttachmentChunkForVarBinaryMaxField(String strTableName, IDbConnection conn, String strFilePath, String strFileExt, Byte[] bytesToWrite, AttachTableStorageType atst)

   at Trebuchet.Database.SqlServerEngineSpecificHelper.WriteFirstAttachmentChunk(String strTableName, IDbConnection conn, String strFilePath, String strFileExt, Byte[] bytesToWrite, AttachTableStorageType atst)

   at Trebuchet.Database.AttachmentDbAccessor.WriteFirstAttachmentChunk(String tableName, String filePath, String fileExtension, Byte[] bytesToWrite, AttachTableStorageType atst)

   at Trebuchet.Database.AttachmentDbAccessor.WriteFirstAttachmentChunk(String filePath, String fileExtension, Byte[] bytesToWrite, AttachTableStorageType atst)

Inner exc:

[Trebuchet.TrebuchetSqlDbException] Error while performing query. See server logs for details. CorrelationID 9434d2a1569f8f40d4ae5c44bfa2427151e564967f.

   at Trebuchet.Database.BaseEngineHelper.BaseExecute[TReturn](Func`1 serviceExecFunc, String methodName, String queryText, String logQueryTypeMessage, String logMessageNameForResult, DebugCategory debuggerCategory)

   at Trebuchet.Database.BaseEngineHelper.RunExecuteNonQuery(IDbCommand command, String methodName)

   at Trebuchet.Database.SqlServerEngineSpecificHelper.WriteNextAttachmentChunkForVarBinaryMaxField(String strTableName, IDbConnection conn, BinaryChunkInfo info)