Skip to Content
Technical Articles
Author's profile photo ALEXANDR ZAYTSEV

SAP PO loses connections after 130 seconds

Issue:

Sometimes connections are broken after 2 minutes and 10 seconds.

Log%20of%20the%20error%20from%20SAP%20NWA%20next%20to%20Connection%20Monitoring

Log of the error from SAP NWA (Connection Monitoring)

Environment:

  • SAP ERP
  • SAP Process Orchestration 7.4 on Linux
  • Proxy (Squid on Windows Server 2012)
  • Third-party system

Connection schema:

SAP ERP -> SAP PO -> Proxy -> Third-party system

How to investigate:

You find a lot of connections in SYN_SENT state. Linux > netstat -anop

tcp 0 1 <ip_SAP_PO>:40404 <ip_target>:3128 SYN_SENT 126029/jstart on (0.48/0/0)
tcp 0 1 <ip_SAP_PO>:40404 <ip_target>:3128 SYN_SENT 126029/jstart on (1.42/1/0)
tcp 0 1 <ip_SAP_PO>:40404 <ip_target>:3128 SYN_SENT 126029/jstart on (0.35/1/0)
tcp 0 1 <ip_SAP_PO>:40404 <ip_target>:3128 SYN_SENT 126029/jstart on (3.30/2/0)
tcp 0 1 <ip_SAP_PO>:40404 <ip_target>:3128 SYN_SENT 126029/jstart on (2.22/2/0)
tcp 0 1 <ip_SAP_PO>:40404 <ip_target>:3128 SYN_SENT 126029/jstart on (1.15/2/0)

where (#1,#2,#3), #1 is time of attempt, #2 is how many attempts

The retries are staggered at 1s, 3s, 7s, 15s, 31s, 63s marks (the inter-retry time starts at 2s and then doubles each time). By default the whole process takes 130 seconds.

Then you need to check a network layer in OS (Proxy) by Wireshark:

Wireshark%20log%20from%20Proxy

Wireshark log from Proxy

And you find “a new tcp session is started with the same ports as an earlier session in this trace“. This means that ip-port pair is in used state in OS (Proxy) and you need to release it.

Solution:

You need to force releasing ip-port pairs by changing two parameters in Windows:

Windows%20parameters

Windows parameters

There are two parameters in HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Tcpip\Parameters:

  • Set TcpTimedWaitDelay to 0x1e (30 seconds)
  • Set StrictTimeWaitSeqCheck in 1

Useful links:

When TCP sockets refuse to die

Settings that can be Modified to Improve Network Performance

 

Assigned Tags

      Be the first to leave a comment
      You must be Logged on to comment or reply to a post.