8

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?

Dominic Cronin
  • 6,062
  • 2
  • 23
  • 56
Chris Summers
  • 10,153
  • 1
  • 21
  • 46

4 Answers4

12

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.

JRW
  • 1,311
  • 9
  • 9
3

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"/>

Andrey Marchuk
  • 13,301
  • 2
  • 36
  • 52
  • That seems to get me a step closer, it seems like the Core Service is now timing out. Is there a way to increase transaction timeout for this part of the chain? – Chris Summers Mar 02 '12 at 13:54
  • @ChrisSummers Yes, you can increase it here, but you will probably have to increase on the server side as well. Could you post a new exception you are getting? – Andrey Marchuk Mar 02 '12 at 14:03
  • We seem to have 3 errors in the Event Logs: The First ______________________________________________________________ A database error occurred while executing Stored Procedure "TCM_QUEUE_MESSAGES_READ". Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding. Component: Tridion.ContentManager.Publishing Errorcode: 0 User: NT AUTHORITY\SYSTEM – Chris Summers Mar 02 '12 at 16:00
  • The Second ______________________________________________________________ The operation is not valid for the state of the transaction. Transaction Timeout Component: Tridion.ContentManager.CoreService Errorcode: 0 User: NT AUTHORITY\NETWORK SERVICE – Chris Summers Mar 02 '12 at 16:03
  • The Third 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... – Chris Summers Mar 02 '12 at 16:04
  • Looks like database timeout to me – Andrey Marchuk Mar 05 '12 at 14:24
2

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"/>
Chris Summers
  • 10,153
  • 1
  • 21
  • 46
Bappi
  • 918
  • 1
  • 5
  • 9
1

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.

Dominic Cronin
  • 6,062
  • 2
  • 23
  • 56