Retail POS Offline provisioning timing out

I am trying to provision offline POS in our retail store. We are currently using AX 2012 R2 CU9. When attempting to provision the offline DB with Retail DB utility it always get a timeout when it is starting to populate the DirPartyTable.__tracking table. We do probably have about a million records in this table. I have tried adding "Connect Timeout=900" to the Retail DB utility config file but this does not seem to make a difference as it times out after about 30 seconds. If I remove the DirPartyTable from the Offline scope the offline provisioning will complete with out any errors. But Offline is not usable without the DirPartyTable.

Below are the logs from the Retail DB utility as it times out. Any help is very much appreciated.

VERBOSE, RetailDatabaseUtility, 4, 04/03/2018 15:14:32:582,    Executing Command: CREATE TABLE [DIRPARTYTABLE_tracking] ([RECID] bigint NOT NULL, [update_scope_local_id] int NULL, [scope_update_peer_key] int NULL, [scope_update_peer_timestamp] bigint NULL, [local_update_peer_key] int NOT NULL, [local_update_peer_timestamp] timestamp NOT NULL, [create_scope_local_id] int NULL, [scope_create_peer_key] int NULL, [scope_create_peer_timestamp] bigint NULL, [local_create_peer_key] int NOT NULL, [local_create_peer_timestamp] bigint NOT NULL, [sync_row_is_tombstone] int NOT NULL, [restore_timestamp] bigint NULL, [last_change_datetime] datetime NULL)
VERBOSE, RetailDatabaseUtility, 4, 04/03/2018 15:14:32:584,    Executing Command: ALTER TABLE [DIRPARTYTABLE_tracking] ADD CONSTRAINT [PK_DIRPARTYTABLE_tracking] PRIMARY KEY ([RECID])
VERBOSE, RetailDatabaseUtility, 4, 04/03/2018 15:14:32:588,    Executing Command: CREATE NONCLUSTERED INDEX [local_update_peer_timestamp_index] ON [DIRPARTYTABLE_tracking] ([local_update_peer_timestamp], [RECID])
INFO   , RetailDatabaseUtility, 4, 04/03/2018 15:14:32:590, Populating from base table
VERBOSE, RetailDatabaseUtility, 4, 04/03/2018 15:14:32:590,    Executing Command: INSERT INTO [DIRPARTYTABLE_tracking] ([RECID], [create_scope_local_id], [local_create_peer_key], [local_create_peer_timestamp], [update_scope_local_id], [local_update_peer_key], [sync_row_is_tombstone]) SELECT [base].[RECID], NULL, 0, CAST(@@DBTS AS BIGINT) + 1, NULL, 0, 0 FROM [DIRPARTYTABLE] [base] LEFT OUTER JOIN [DIRPARTYTABLE_tracking] [side] ON [base].[RECID] = [side].[RECID] WHERE [side].[RECID] IS NULL;
ERROR  , RetailDatabaseUtility, 4, 04/03/2018 15:15:07:680, Caught exception: System.Data.SqlClient.SqlException (0x80131904): Execution 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.SqlCommand.RunExecuteNonQueryTds(String methodName, Boolean async, Int32 timeout, Boolean asyncWrite)
   at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
   at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
   at Microsoft.Synchronization.Data.SqlServer.SqlSyncTrackingTableHelper.PopulateFromBaseTable(SqlTransaction trans)
   at Microsoft.Synchronization.Data.SqlServer.SqlSyncTableProvisioning.Apply(SqlTransaction trans)
ClientConnectionId:d833c411-b19b-4ebc-9939-15b093a0f390
Error Number:-2,State:0,Class:11
Error Number:-2,State:0,Class:11
ERROR  , RetailDatabaseUtility, 4, 04/03/2018 15:15:07:680, Caught exception: System.Data.SqlClient.SqlException (0x80131904): Execution 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.SqlCommand.RunExecuteNonQueryTds(String methodName, Boolean async, Int32 timeout, Boolean asyncWrite)
   at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
   at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
   at Microsoft.Synchronization.Data.SqlServer.SqlSyncTrackingTableHelper.PopulateFromBaseTable(SqlTransaction trans)
   at Microsoft.Synchronization.Data.SqlServer.SqlSyncTableProvisioning.Apply(SqlTransaction trans)
   at Microsoft.Synchronization.Data.SqlServer.SqlSyncScopeProvisioning.ApplyScope(SqlConnection connection)
   at Microsoft.Synchronization.Data.SqlServer.SqlSyncScopeProvisioning.ApplyInternal(SqlConnection connection)
   at Microsoft.Synchronization.Data.SqlServer.SqlSyncScopeProvisioning.Apply()
ClientConnectionId:d833c411-b19b-4ebc-9939-15b093a0f390
Error Number:-2,State:0,Class:11
ERROR  , RetailDatabaseUtility, 4, 04/03/2018 15:15:07:680, An error occurred during provisioning. Removing all provisioning artifacts. Error Message: 'Execution Timeout Expired.  The timeout period elapsed prior to completion of the operation or the server is not responding.'
INFO   , RetailDatabaseUtility, 4, 04/03/2018 15:15:07:683, ----- Deprovisioning sync objects on Database----
Related
Recommended