Skip to content
This repository has been archived by the owner on May 12, 2021. It is now read-only.

Configure custom read timeout interval to handle sockettimeout #20

Open
totojack opened this issue Nov 2, 2016 · 2 comments
Open

Configure custom read timeout interval to handle sockettimeout #20

totojack opened this issue Nov 2, 2016 · 2 comments

Comments

@totojack
Copy link

totojack commented Nov 2, 2016

Hi.

Is it possible to configure a custom read timeout interval for http requests? The stacktrace below was generated by cli v. 0.5. This is not a problem on client side, because obviously it depends on server response, but in some cases it could be useful.

java.net.SocketTimeoutException: Read timed out
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at sun.net.www.protocol.http.HttpURLConnection$10.run(HttpURLConnection.java:1890)
at sun.net.www.protocol.http.HttpURLConnection$10.run(HttpURLConnection.java:1885)
at java.security.AccessController.doPrivileged(Native Method)
at sun.net.www.protocol.http.HttpURLConnection.getChainedException(HttpURLConnection.java:1884)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1457)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1441)
at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:480)
at scalaj.http.HttpRequest.exec(Http.scala:351)
at scalaj.http.HttpRequest.execute(Http.scala:322)
at scalaj.http.HttpRequest.asString(Http.scala:537)
at com.datamountaineer.connect.tools.ScalajHttpClient$.request(RestKafkaConnectApi.scala:62)

@andrewstevenson
Copy link
Contributor

Where is your Schema registry?

@totojack
Copy link
Author

totojack commented Nov 2, 2016

It's a docker environment, and kafka cli and schema registry containers are in the same network. This is not a persistent problem, it occurs sometimes, probably for heavy load, executing run commands on kafka connectors. As I said, this is not a client problem. I'm wondering if it could be handled increasing timeout on client side.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants