Publishing customizations may not succeed after installing Update Rollup 3 or 4
We have noticed that publishing (N.B. not importing ) the customizations may be significantly slower and even fail to complete after installing Update Rollup 3 or 4.
If CRM tracing is enabled then you will find in the corresponding log file the following entry:
Exception when executing non-query: exec p_PublishMetadata 1 Exception: System.Data.SqlClient.SqlException: 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)
at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)
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)
at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async)
at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result)
at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe)
at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
at Microsoft.Crm.CrmDbConnection.InternalExecuteNonQuery(IDbCommand command)
at Microsoft.Crm.CrmDbConnection.ExecuteNonQuery(IDbCommand command, Boolean impersonate)
at Microsoft.Crm.CrmDbConnection.ExecuteNonQuery(IDbCommand command)
at Microsoft.Crm.Platform.MetadataBusinessEntities.MetadataProcessObject.ExecuteNonQuery(IDbCommand command)
The "Timeout expired" error message refers to the fact that a single non-query (exec p_PublishMetadata) took longer than the OLEDBTimeout value specified in the MSCRM registry subkey.
The first aid solution is to increase the timeout values as described in eg.
A time-out occurs when you import large customization files into Microsoft Dynamics CRM
https://support.microsoft.com/kb/918609
In the upcoming Update Rollup 5 we are going to improve the execution time of the p_PublishMetadata by adding a new specific index to the MetadataSchema.LocalizedLabel table.
CREATE NONCLUSTERED INDEX [ndx_LocalizedLabel_ForPublish] ON [MetadataSchema].[LocalizedLabel]
(
[ObjectId] ASC,
[InProduction] ASC
)
INCLUDE ( [CustomizationLevel],
[LocalizedLabelId],
[LocalizedLabelRowId]) WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF,
SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF,
ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
In case that you decide to add this index before Update Rollup 5 is available then please make sure that you keep "ndx_LocalizedLabel_ForPublish" as name.
We may modify the index further in the next releases.
Comments
- Anonymous
May 28, 2009
PingBack from http://asp-net-hosting.simplynetdev.com/publishing-customizations-may-not-succeed-after-installing-update-rollup-3-or-4/