Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SDL Tridion times out when publishing multiple items

When using SDL Tridion 2011 SP1 we sometimes receive GUI errors when we perform task on multiple items (e.g. publishing 1000 components from one folder at once). Publish about 100 items from the same list works perfectly.

The error we see is in the CME/GUI is as follows:

The transaction associated with the current connection has completed
but has not been disposed. The transaction must be disposed before the
connection can be used to execute SQL statements.

There is an additional error in the Windows Event Viewer in the Tridion Error log as follows:

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'.
The read operation failed, see inner exception.
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'.
An existing connection was forcibly closed by the remote host

Which timeout values are being used here, and how can we increase these timeout values?

like image 912
Chris Summers Avatar asked Mar 01 '12 00:03

Chris Summers


4 Answers

In %windir%\Microsoft.NET\Framework64\v4.0.30319\Config\machine.config and %windir%\Microsoft.NET\Framework\v4.0.30319\Config\machine.config

  • Change allowExeDefinition from “MachineOnly” to “MachineToApplication”
  • Before < /configuration > add the section below

In Tridion\config\Tridion.ContentManager.config - Provide a value for transactionTimeout in seconds < session transactionTimeout="3600" />

In Tridion\bin\TcmServiceHost.exe.config - change the CoreService_netTcpBinding binding

<binding name="CoreService_netTcpBinding" 
transactionFlow="true" 
transactionProtocol="WSAtomicTransaction11" 
maxReceivedMessageSize="2147483647" 
closeTimeout="00:30:00" 
openTimeout="00:30:00" 
receiveTimeout="00:30:00" 
sendTimeout="00:30:00">
  • Add the following before < serviceTimeouts transactionTimeout="00:30:00" />

in Tridion\web\WebUI\WebRoot\Web.config - change the CoreService_netTcpBinding binding

<binding name="TcmNetTcpBinding" 
maxBufferSize="2147483647" 
maxReceivedMessageSize="2147483647" 
maxBufferPoolSize="2147483647" 
closeTimeout="00:30:00" 
openTimeout="00:30:00" 
receiveTimeout="00:30:00" 
sendTimeout="00:30:00"
transactionFlow="true" 
transactionProtocol="WSAtomicTransaction11">

This sets your timeouts to 30 minutes.

like image 130
JRW Avatar answered Nov 18 '22 16:11

JRW


This is transaction timeout. If you are publishing through the GUI you can try:

  • open "%TRIDION_HOME%\Web\WebUI\WebRoot\web.config"
  • Go to system.serviceModel -> bindings -> netTcpBinding -> binding ("TcmNetTcpBinding")
  • Change "readerQuotas" values to something like this:

readerQuotas maxArrayLength="10485760" maxBytesPerRead="5120" maxDepth="32" maxNameTableCharCount="81920" maxStringContentLength="10485760"/>

like image 31
Andrey Marchuk Avatar answered Nov 18 '22 16:11

Andrey Marchuk


Open TcmServiceHost.exe.config located in the "C:\Program Files (x86)\Tridion\Bin" folder. Naviagte to configuration->system.serviceModel->behaviors->serviceBehaviors->behavior-> Node. Add the following node

<serviceTimeouts transactionTimeout="00:10:00" />

Also make this changes:

  1. Open web.config located at "%TRIDION_HOME%\Web\WebUI\WebRoot"
  2. Navigate to system.serviceModel -> bindings -> netTcpBinding -> binding ("TcmNetTcpBinding")
  3. Replace the "readerQuotas" node with this:

    <readerQuotas maxArrayLength="10485760" maxBytesPerRead="5120" maxDepth="32" maxNameTableCharCount="81920" maxStringContentLength="10485760"/>

If this does not work then try this config:

<readerQuotas maxArrayLength="10485760" maxStringContentLength="10485760"/>
like image 2
Bappi Avatar answered Nov 18 '22 14:11

Bappi


Based on your comments, this timeout is clearly on the database. The message about the stored procedure says this. Once the database timeout occurs, then aborting the transaction and closing the socket are presumably inevitable.

On the Tridion CM server you can adjust the timeout settings in the Tridion management snap-in. In the "timeout settings" node there are a couple that might be relevant.

Even so, the defaults for these are quite long, and if you're hitting them, then I'd suggest that you look for a root cause. I'd first check that the optimiser statistics are being correctly maintained.

like image 1
Dominic Cronin Avatar answered Nov 18 '22 14:11

Dominic Cronin