will configuring load balancer solves the application read time out issue?

ffbld01@uk.ibm.com 96 Reputation points
2021-01-11T06:39:14.533+00:00

Steps I have done

  1. Created ubnutu VM
  2. logged in, install docker and brought IBM App connect professional (ACP) docker container on it.
  3. The ACP java application connects to salesforce and gets the data and process it.

issue

  1. Scheduled the job to run for every 1minute and it runs fines without any issue.
  2. Scheduled the job to run for every 5mins, it runs fine on 1st and 2nd iteration. But always 3rd iteration fails, (some times even 2nd iteration fails) with read time out issue.

error

java.net.SocketTimeoutException: Read timed out
at java.net.SocketInputStream.socketRead0(Native Method)
at java.net.SocketInputStream.socketRead(SocketInputStream.java:127)
at java.net.SocketInputStream.read(SocketInputStream.java:182)
at java.net.SocketInputStream.read(SocketInputStream.java:152)
at com.ibm.jsse2.b.a(b.java:49)
at com.ibm.jsse2.b.a(b.java:192)
at com.ibm.jsse2.av.a(av.java:407)
at com.ibm.jsse2.av.a(av.java:627)
at com.ibm.jsse2.f.read(f.java:4)
at org.apache.http.impl.io.SessionInputBufferImpl.streamRead(SessionInputBufferImpl.java:139)
at org.apache.http.impl.io.SessionInputBufferImpl.fillBuffer(SessionInputBufferImpl.java:155)
at org.apache.http.impl.io.SessionInputBufferImpl.readLine(SessionInputBufferImpl.java:284)

  1. I have configured the load balancer and changed the default time out to 15 minutes, but the issue was still same.

Questions.

  1. Will configuring the load balancer will solve the read time out issue?
  2. Is application required to send KeepAlive?
  3. Configuring the os level tcp parameter will solve the issue? I have configured these three parameters in os level then I brought up the docker container and I can see the same configured parameters on docker as well. But the issue did not solve.

net.ipv4.tcp_keepalive_time = 120
net.ipv4.tcp_keepalive_intvl = 30
net.ipv4.tcp_keepalive_probes = 8

From my observation this is what happening. ACP makes call to salesforce, the socket is created and it got response back from salesforce. In next call, the ACP is try to use the same opened socket, since the there is idle time out greater than 4min, azure may be making that socket invalid, but the is not known to ACP. So our application again tries to connect to the same opened socket, but it fails.

Is it possible to configure the azure VM to make sure the application to know this, so that it will create new socket in next call and works fine.

Please can you help this.

Azure Virtual Machines
Azure Virtual Machines
An Azure service that is used to provision Windows and Linux virtual machines.
7,989 questions
Azure VMware Solution
Azure VMware Solution
An Azure service that runs native VMware workloads on Azure.
359 questions
Azure Virtual Network
Azure Virtual Network
An Azure networking service that is used to provision private networks and optionally to connect to on-premises datacenters.
2,498 questions
Azure Load Balancer
Azure Load Balancer
An Azure service that delivers high availability and network performance to applications.
451 questions
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.