VERIFIED SOLUTION i

Resolve issue where the CustomerMetadataTool can timeout loading large amounts of metadata in Portrait Shared Server

Product Feature: Administration, Publish Data

Issue

When running the CustomerMetadataTool to import customer metadata from Interaction Optimizer, Dialogue or Explorer into the Portrait Shared Repository, after approximately 10 minutes it gives an error like:

*** Error: Fault code: 3083, Detail: Failure saving external system 'PortraitDialogue'.

and the Portrait Shared Server (PSS) log file (in C:\Program Files (x86)\PST\Portrait Shared Server\Portrait Shared Services\Logfiles) contains:

04.12.2015 11:03:17.313        Failure saving external system 'PortraitDialogue'.
   at Portrait.Mas.Cms.Services.MetadataServices.MetadataService.SaveExternalSystem(State& state, ExternalSystem& externalSystem) in d:\Build\80\Sources\CMS\Services\MetadataServices\MetadataService.cs:line 319
   at Portrait.Mas.Cms.Services.MetadataServices.MetadataService.UpdateExternalSystem(State& state, ExternalSystem& externalSystem) in d:\Build\80\Sources\CMS\Services\MetadataServices\MetadataService.cs:line 1708
   at Portrait.Mas.Cms.Services.MetadataServices.MetadataService.UpdateMetadata(State& state, String externalSystemName, String domainName, ExternalSystem& externalSystem, Nullable`1 pcmDomainId) in d:\Build\80\Sources\CMS\Services\MetadataServices\MetadataService.cs:line 570
   at SyncInvokeUpdateMetadata(Object , Object[] , Object[] )
   at System.ServiceModel.Dispatcher.SyncMethodInvoker.Invoke(Object instance, Object[] inputs, Object[]& outputs)
   at Portrait.Mas.Cms.Services.Utils.SecureOperationInvoker.Invoke(Object instance, Object[] inputs, Object[]& outputs) in d:\Build\80\Sources\CMS\Services\Utils\SecureOperationInvoker.cs:line 198
04.12.2015 11:03:17.313        
Transaction Timeout
Key Exception Information:
-----------------------------------------------------------------------
Date occured:               04-12-2015 11:03:17
Base exception message:     Transaction Timeout
MachineName:                PortraitPSS_Server
ApplicationDomainID:        2
ProcessID:                  3084
ProcessName:                w3wp
ThreadName:                 
Base Exception Details:
-----------------------------------------------------------------------
Base exception message:     Transaction Timeout
Base exception method:      
Base exception class:       
Base exception source:      
Complete Base Exception Stack Trace:
-----------------------------------------------------------------------
Exception Hierarchy
-----------------------------------------------------------------------
The underlying provider failed on Open. - (Method: OpenStoreConnectionIf, Class: System.Data.EntityClient.EntityConnection, Source: System.Data.Entity)
    The operation is not valid for the state of the transaction. - (Method: EnlistPromotableSinglePhase, Class: System.Transactions.TransactionState, Source: System.Transactions)
        Transaction Timeout - (Method: , Class: , Source: )



The PSS web.config file contains an entry for:

    <add key="TransactionScopeTimeout" value="00:20:00"/>

so why is the timeout happening after 10 minutes?

Cause

By default all the distributed transactions initiated by the Portrait products have a default maximum timeout of 10 minutes, this is a Microsoft .NET machine level setting.  Trying to override this timeout in the application web.config file results in it being adjusted down to 10 minutes.

 

Resolution

UPDATED: August 2, 2017
To override this default Microsoft .NET setting, to increase the maximum timeout allowed, the machine level setting should be configured by adding an entry to the C:\Windows\Microsoft.Net\Framework64\v4.0.30319\Config\machine.config file, for example to set the maximum timeout to 30 minutes:
 
<system.transactions>
   <machineSettings maxTimeout="00:30:00/>
</system.transactions>

 
alongside similar settings for the 'TransactionScopeTimeout' value in the PSS application's web.config.