Open tonysimpson-sonocent opened 2 years ago
We would like to keep the possibility to reuse connections. If there are a lot of API requests it reduces the overhead of the connection establishment, TLS handshake etc. significantly.
We have heard of this "Connection reset" problems from other customers but we are not sure why exactly this is happening. Could you test if setting timeToLive
to 1h would solve this issue?
We are experiencing this issue as well.
I, too, am having this problem.
Hi, we're seeing a few "java.net.SocketException: Connection reset" exception in our logs coming from cloudconvert-java.
We think these are being caused because
PoolingHttpClientConnectionManager
is being used without atimeToLive
and your API does not return akeep-alive
orConnection: close
headers soPoolingHttpClientConnectionManager
will expect connection can stay open forever.We will probably work around this for how by creating a new client every request.
I had a look at the cloudconvert-python client, it does not reuse connections.
Honestly I'm not sure what the best fix is. Giving
PoolingHttpClientConnectionManager
atimeToLive
or returning akeep-alive
header of something sensible like 1 hour would probably eliminate these errors for us. However in my experience in corporate networks environments overloaded or misconfigured routers will reset (RST
) connections after only a few minutes.