2

We have a system whereby we make a RESTful callback to a client's remote server. We are seeing timeouts waiting for a response when a request has apparently been sent. Some constraints:

  1. it is difficult to get hold of TCP dump logs outside of the server, elsewhere on the local network.
  2. We do not have access to the client's system.

We think that, when traffic is low, the remote proxy is killing idle connections without telling us. I have added a reaper thread for idle connections. This should have been in there already and adding it is an improvement to the system. However, I still would like to simulate the error condition on our local network and that has proven a little tricky. Our test server, a servlet container, is well-behaved in that it is correctly closing TCP connections.

How should I go about creating a setup whereby:

  1. idle connections are dropped without further TCP traffic
  2. further traffic relating to those connections is ignored?
1
  • Did any answer help you? If so, you should accept the answer so that the question doesn't keep popping up forever, looking for an answer. Alternatively, you can post and accept your own answer.
    – Ron Maupin
    Dec 21, 2020 at 18:19

1 Answer 1

1

You could put in a router with NAT or a firewall between, and set the TCP timeout to be very low.

Alternatively, you could try to correct the situation by using TCP keepalive. This will periodically send TCP ACKs with no data in order to keep the TCP session open.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.