Salesforce

In Tridion Sites 9.1 and above, how to modify various settings to extend core service timeouts

« Go Back

Information

 
Article TypeSolution Article
Scope/EnvironmentArticle applicable for all Tridion Sites product versions 9.1 and above
Symptoms/Context
- A Web administrator sees issues indicating the default core service timeouts need to be extended, such as below error message in the Windows Event Viewer of CM (Content Management) server.
The socket connection was aborted. This could be caused by an error processing your message or a receive timeout 
being exceeded by the remote host, or an underlying network resource issue. 
Local socket timeout was '10675199.02:48:05.4775807'
- Timeouts seen when bulk publishing.
- Timeouts seen when importing large files or complex transactions via Content Porter.
Resolution
Typically the default timeout settings are adequate and it is not necessary to extend timeouts.  However it is sometimes necessary to extend the core service timeouts, such as when:
- there is an inordinate amount of data with unpurged versions, completed workflow activities, or a high volume of item associations
https://gateway.sdl.com/CommunitySearchResults#q=purge&d=sdlWeb
- When database maintenance (index rebuilding, update statistics) is not regularly done
https://gateway.sdl.com/CommunitySearchResults#q=statistics&d=SDLTridionSites
There is no disadvantage to proactively extending the core service timeouts to mitigate application issues.

Take a backup of the original file(s) first as a precaution as the setting change could be easily not entered correctly or the .config is made mal-formed for some reason. Screenshots are from an Web 8.5/Windows Server 2012 R2 environment **before** the modifications are made.
 
1In %windir%\Microsoft.net\Framework\v4.0.30319\config
 and 
%windir%\Microsoft.net\Framework64\v4.0.30319\config
modify the machine.config file as follows.
Change allowExeDefinition from MachineOnly to MachineToApplication for 3 elements in that file:
 
<section name="commonBehaviors"……
<section name="machineSettings"……
<sectionGroup name="system.transactions"……
Add these setting before the </configuration> element:
<system.transactions>
<defaultSettings timeout="01:00:00" />
<machineSettings maxTimeout="01:00:00"/>
</system.transactions>
User-added image
User-added image
User-added image
2Next, in %TRIDION_HOME%\bin\TcmServiceHost.exe.config, edit the existing element called <serviceTimeouts transactionTimeout=”01:00:00” />
(The existing element should reside inside <behaviors>/<serviceBehaviors>/<behavior name="Tridion.ContentManager.ServiceHost.WindowsServiceHost.CoreServiceBehavior">

NOTE: The setting is case-sensitive:
User-added image
3Add attributes closeTimeout, openTimeout, receiveTimeout and sendTimeout to binding name="CoreService_netTcpBinding" 
(inside <bindings>/<netTcpBinding><binding name="CoreService_netTcpBinding"....> )

NOTE: The attributes are case-sensitive and they can be on the same line. For the example screenshot below, they are shown on individual line for clarity:
User-added image
4Increase timeout setting in %TRIDION_HOME%\web\webui\webroot\web.config
Increase sendTimeout and receiveTimeout attributes in <bindings>/ <webHttpBinding>/<binding name="Tridion.Web.UI.ContentManager.WebServices.WebHttpBindingConfig 

NOTE: The example here is for HTTP. If your Content Manager uses HTTPS in its protocol, make the increase/change to the HTTPS section as well.
User-added image
5Increase various timeout setting in %TRIDION_HOME%\webservices\web.config. Essentially, any bindings in that web.config such as in <basicHttpBinding> and <netTcpBinding>
StreamDownload_basicHttpBinding sendTimeout="01:00:00
StreamUpload_basicHttpBinding receiveTimeout="02:00:00
ImportExport_StreamDownload_basicHttpBinding sendTimeout="01:00:00
ImportExport_StreamUpload_basicHttpBinding receiveTimeout="02:00:00" sendTimeout="02:00:00"

NOTE: The 2 hour (“02:00:00”) in the example code snippet of course, of course, can be set to 01:00:00 just like other web.config files but here it is set to 2 hours instead as this web.config is used by Content Porter and large Content Porter import might need a longer timeout.

Also, add <serviceTimeouts transactionTimeout setting like the one listed in step #2.
User-added image
User-added image

User-added image
6Increase various sendTimeout or receiveTimeout settings in %TRIDION_HOME%\web\web.config. 
7Increase sendTimeout in <binding name=”StreamDownload_netTcpBinding” … in  SDLWeb\bin\TcmSearchIndexer.exe.config 
8Increase Transaction timeout in COM+ Application to 3600 (maximum value, do not use anything higher):User-added image
9Increase session transactionTimeout in %TRIDION_HOME%\config\Tridion.ContentManager.config, to a value such as "6000"User-added image
10For any processes (such as rendering, database connection) that takes a long time to execute, consider extending these timeout in the Tridion Snap-in as well.
To make it easy, consider adding another zero to the settings that were already there:

Default values:


Extended values:


NOTE: The values above are just general suggestions. These values have accommodated most scenarios but might not meet specific requirements so may need more tuning.
User-added image
User-added image
11For timeout setting related to the use of powershell commandlet such as Remove-TcmQueueMessages, for example, edit the TcmBatchProcessor.exe.config ( under %TRIDION_HOME%\bin folder) and add various timeout attributes in the "CoreService_NetTcpBinding" binding under <netTcpBinding> element as seen below.User-added image
12After all the changes are applied, restart Tridion COM+ (if used), IISReset and all SDL Web services for the new settings to take effect. 
Root Cause
Reference
Addendum
- SDL Support does not have specific values which we recommend when extending timeouts, this will be implementation specific and administrators should test to determine a reasonable value for environments.
- It is usually necessary to extend core service timeouts when moving large files via Content Porter, as discussed in KB article Content Porter import of large packages fails with the error "An error (The request was aborted: The request was canceled.) occurred while transmitting data over the HTTP channel."
- Also see KB article SDL Web 8.5 Content Porter takes a long time to export even individual items using an Oracle database
- Also see KB article Cannot upload large binary files into a MultiMedia component: "The request channel timed out attempting to send after 00:01:00"


Previous version of this document attached for reference.
**Note that copy/pasting from the PDF may result in the incorrect left quotation mark/right quotation marks being pasted in (U201C, U201D).  The correct quotation marks which should be used are 0022.**
Attachment 2 
Attachment 3 
Attachment 4 
Attachment 5 

Powered by