This blog contains posts from the Microsoft Dynamics AX support team highlighting interesting features or issues within Microsoft Dynamics AX.
In any environment you might have Network drops or have to do maintainance in your system. If you have configured the Retail Offline Database, you will be able to switch to this database if the connection is lost to the Store Database.
This process happens automatically, but we had Customer reporting that the time it takes to switch is too long. We have therefore created a hotfix to resolve the problem. The hotfix decreases the time, but if you want to get Down to a very low timeout, you need to adjust global TCP parameters.
Here is what you need to do.
Connection Timeout parameter has been implemented in
KB 2836543 6.0.1108.4445 (Dynamics AX 2012 RTM)
and 6.2.1000.1869 (Dynamics AX 2012 R2).
Additionally you need to apply a Windows hotfix to get the InitailRtO parameter added.
Install the Windows hotfix from this KB article: http://support.microsoft.com/kb/2472264
Set the Initial RTOvalue,as described in the above KB. Note this warning in the article:
Warning: Setting a low value of Initial RTO could result infailure to connect.
During our testing, we tested with values as low as 300 msec (netsh interface tcp set global initialRto=300) and didn’t see anyproblems. They may need to adjust this value a few times to find the setting that is right in your environment.
The setting reduced the time the POS discovers that the Network connection to the Store database from 40-50 seconds to around 20 -22 seconds. Some retailers have higher demands and with the following TCP parameters, we can get Down to 3 seconds.
(Parameter [connection timeout] in connection string of POS only works when SQL is gone, but network connection is still up.)
Have a look at TCPRetransmission Behavior article on the MSDN site:
A number of registry values under theHKEY_LOCAL_MACHINE\System\CurrentControlSetServices\Tcpip\Parameters registrykey adjust the behavior of TCP retransmission:
The per-adapter value TcpInitialRtt controls the retransmission timer. This timer identifies the number of milliseconds to wait for an acknowledgmentafter the first transmission of a segment before retransmitting it.
The TcpMaxConnectRetransmissions value indicates the maximum number of retransmissions that can be sent for a new connection request.
The TcpMaxDataRetransmissions value indicates the maximum number of retransmissions that can be sent on an existing connection. The default is 5.
The retransmission time-out is adjusted on the fly to match the characteristics of the connection, using Smoothed RoundTrip Time (SRTT) calculations… The retransmission time-out for a given segment is doubled after each retransmission of that segment.
According to this document the default value of TcpInitialRtt is 3 andTcpMaxConnectRetransmissions is 2.So the default connection timeout is calculated like this: 3 + 3*2 + 3*2*2 = 21 seconds,after you set TcpMaxConnectRetransmissions to 1 it becames: 3 + 3*2 = 9 seconds.
3 + 3*2 + 3*2*2 = 21 seconds
3 + 3*2 = 9 seconds
Modify following reg entries:
So to recap the total solution:
Regarding the last point. If you lower it too low, you are more affected by suddenly network drops/timeout and the stability is affected. Increase it to the value that guarantee stability and acceptable time.
Other Microsoft Sites
I'm a Customer
I'm a Partner
Follow Microsoft Dynamics