Error when renaming document that has child documents

Luke Tongue asked on March 17, 2016 19:10

I am getting a very strange error when trying to change the name of a document. I have the document name mapped to a title field in my page type. If i try & change the title - which will in turn change the document name & the document has child documents i get the following error:

An error occurred when saving data. Please see event log for more details. Message:

Proc_CMS_Document_UpdateDocumentNamePath

Caused exception: Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.

Exception type: System.Exception Stack Trace: at CMS.DataEngine.AbstractDataConnection.HandleError(String queryText, Exception ex) at CMS.DataEngine.AbstractDataConnection.ExecuteQuery(String queryText, QueryDataParameters queryParams, QueryTypeEnum queryType, Boolean requiresTransaction) at CMS.DataEngine.AbstractDataConnection.CMS.DataEngine.IDataConnection.ExecuteQuery(String queryText, QueryDataParameters queryParams, QueryTypeEnum queryType, Boolean requiresTransaction) at CMS.DataEngine.GeneralConnection.RunQuery(QueryParameters query) at CMS.DataEngine.GeneralConnection.ExecuteQuery(QueryParameters query) at CMS.DataEngine.GeneralConnection.ExecuteQuery(QueryParameters query, Int32& totalRecords) at CMS.DataEngine.DataQueryBase1.GetDataFromDBInternal() at CMS.DataEngine.DataQueryBase1.GetDataFromDB() at CMS.DataEngine.DataQueryBase1.GetData() at CMS.DataEngine.DataQueryBase1.get_Result() at CMS.DataEngine.ConnectionHelper.ExecuteQuery(String queryName, QueryDataParameters parameters, String where, String orderBy, Int32 topN, String columns, Int32 offset, Int32 maxRecords, Int32& totalRecords) at CMS.DocumentEngine.DocumentPathsUpdater.ExecuteUpdateDocumentPath(DocumentPrefixes prefixes, Boolean allCultureVersions) at CMS.DocumentEngine.DocumentPathsUpdater.<>c__DisplayClass6.b__5() at CMS.DocumentEngine.DocumentContinuousIntegrationHelper.HandleBulkUpdate(Boolean allowContinuousIntegrationActions, IWhereCondition bulkWhere, Action bulkUpdate) at CMS.DocumentEngine.DocumentPathsUpdater.UpdateDocumentPaths(DocumentPrefixes prefixes, Boolean allCultureVersions) at CMS.DocumentEngine.DocumentPathsUpdater.UpdateAllPaths() at CMS.DocumentEngine.DocumentPathsUpdater.UpdatePaths() at CMS.DocumentEngine.TreeNode.UpdateInternal() at CMS.DocumentEngine.TreeNode.Update(Boolean useDocumentHelper) at CMS.DocumentEngine.DocumentHelper.UpdateDocument(TreeNode node, TreeProvider tree, String updateColumns) at CMS.DocumentEngine.TreeNode.Update(Boolean useDocumentHelper) at CMS.FormControls.CMSDocumentManager.UpdateDocumentInternal(Boolean useDocumentHelper) at CMS.FormControls.CMSDocumentManager.UpdateDocument(Boolean useDocumentHelper) at CMS.FormControls.CMSForm.SaveDataInternal() at CMS.FormControls.BasicForm.SaveData(String redirectUrlAfterSave, Boolean showChangesSaved) at CMS.FormControls.CMSForm.DocumentManager_OnSaveData(Object sender, DocumentManagerEventArgs e) at CMS.FormControls.CMSAbstractManager`2.RaiseSaveData(EventArgsType args) at CMS.FormControls.CMSDocumentManager.SaveDocumentInternal(String actionContext)

Message: Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.

Exception type: System.Data.SqlClient.SqlException Stack Trace: at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action1 wrapCloseInAction) at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action1 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.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.System.Data.IDbCommand.ExecuteReader(CommandBehavior behavior) at System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet) at CMS.DataEngine.AbstractDataConnection.ExecuteQuery(String queryText, QueryDataParameters queryParams, QueryTypeEnum queryType, Boolean requiresTransaction)

Message: The wait operation timed out

Exception type: System.ComponentModel.Win32Exception

Correct Answer

Trevor Fayas answered on March 17, 2016 19:19

How many children does the document have? It could be if you have a slower connection, and it is taking a long time to update a large set of children documents, that it may be timing out.

This should be an attribute in the Connection string in the web.config, usually i think it's 200 seconds by default (3 minutes 20 seconds), but i could be wrong.

(<add name="ConnectionString" connectionString="Data Source=;Initial Catalog=;Persist Security Info=True;User ID=sa;Password=sa@123;Connect Timeout=200" providerName="System.Data.SqlClient"/>)

How long did it hang also before it timed out?

1 votesVote for this answer Unmark Correct answer

Recent Answers


Luke Tongue answered on March 17, 2016 19:58

I can confirm increasing the connection timeout to 200 (it was 60) has fixed this - thanks very much :D

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.