https://pinot.apache.org/ logo
#pinot-dev
Title
# pinot-dev
g

Grace Walkuski

08/19/2021, 9:24 PM
Hi! I’m using the pinot jdbc client and I’m getting a timeout:
Copy code
java.util.concurrent.ExecutionException: java.util.concurrent.ExecutionException: java.util.concurrent.TimeoutException: Request timed out to {broker url} of 60000 ms
	at org.apache.pinot.client.JsonAsyncHttpPinotClientTransport$BrokerResponseFuture.get(JsonAsyncHttpPinotClientTransport.java:173) ~[pinot-java-client-0.7.1.jar:0.7.1-e22be7c3a39e840321d3658e7505f21768b228d6]
	at org.apache.pinot.client.JsonAsyncHttpPinotClientTransport$BrokerResponseFuture.get(JsonAsyncHttpPinotClientTransport.java:152) ~[pinot-java-client-0.7.1.jar:0.7.1-e22be7c3a39e840321d3658e7505f21768b228d6]
	at org.apache.pinot.client.JsonAsyncHttpPinotClientTransport$BrokerResponseFuture.get(JsonAsyncHttpPinotClientTransport.java:123) ~[pinot-java-client-0.7.1.jar:0.7.1-e22be7c3a39e840321d3658e7505f21768b228d6]
	at org.apache.pinot.client.JsonAsyncHttpPinotClientTransport.executeQuery(JsonAsyncHttpPinotClientTransport.java:102) ~[pinot-java-client-0.7.1.jar:0.7.1-e22be7c3a39e840321d3658e7505f21768b228d6]
	at org.apache.pinot.client.Connection.execute(Connection.java:127) ~[pinot-java-client-0.7.1.jar:0.7.1-e22be7c3a39e840321d3658e7505f21768b228d6]
	at org.apache.pinot.client.Connection.execute(Connection.java:96) ~[pinot-java-client-0.7.1.jar:0.7.1-e22be7c3a39e840321d3658e7505f21768b228d6]
	at org.apache.pinot.client.PreparedStatement.execute(PreparedStatement.java:72) ~[pinot-java-client-0.7.1.jar:0.7.1-e22be7c3a39e840321d3658e7505f21768b228d6]
	at org.apache.pinot.client.PinotPreparedStatement.executeQuery(PinotPreparedStatement.java:193) ~[pinot-jdbc-client-0.7.1.jar:0.7.1-e22be7c3a39e840321d3658e7505f21768b228d6]
	at org.apache.pinot.client.PinotPreparedStatement.execute(PinotPreparedStatement.java:160) ~[pinot-jdbc-client-0.7.1.jar:0.7.1-e22be7c3a39e840321d3658e7505f21768b228d6]
Where is the
60000
ms being set? Can I increase it? Thanks!
x

Xiang Fu

08/19/2021, 9:54 PM
I think this is set at broker/server side. pinot.broker.timeoutMs https://docs.pinot.apache.org/configuration-reference/broker pinot.server.query.executor.timeout https://docs.pinot.apache.org/configuration-reference/server
g

Grace Walkuski

08/19/2021, 9:57 PM
Gotcha, thanks!
when i run the same query directly against the databse via the pinot ui, it runs and takes more than 60000ms. if its set at the broker level, wouldn’t it timeout there too?
k

Ken Krugler

08/19/2021, 10:01 PM
Hi @User - isn’t this error coming from the
AsyncHttpClient
, which is being used by
JsonAsyncHttpPinotClientTransport
? If so, then the only way I see of changing the connection timeout is via system properties, e.g.
-Dcom.ning.http.client.AsyncHttpClientConfig.defaultConnectionTimeoutInMS=120000
, but I haven’t tried that. (also defaultRequestTimeoutInMS, I think)
x

Xiang Fu

08/19/2021, 10:01 PM
ui side timeout parameter is carried with the query it self, so both broker and server side will override it for that query
hmmm
ah, you mean it’s http timeout
not the query timeout
k

Ken Krugler

08/19/2021, 10:02 PM
I think so, based on the stack trace
x

Xiang Fu

08/19/2021, 10:04 PM
hmmm
message has been deleted
from code, client side set 1000 days as timeout
in
JsonAsyncHttpPinotClientTransport.java
k

Ken Krugler

08/19/2021, 11:14 PM
I think that’s the timeout for how long the
BrokerResponseFuture
will wait for the HTTP client to return a result (essentially unbounded). But I think the HTTP client is throwing the timeout exception here.
g

Grace Walkuski

08/20/2021, 4:12 PM
Is there any way I can up it?
k

Ken Krugler

08/21/2021, 2:07 PM
See my earlier comment about changing via system properties. You’d need these set when starting whatever Java process is using the jdbc client
g

Grace Walkuski

08/21/2021, 2:54 PM
I see. Thanks!
Neither of the options above worked. I’m still getting the 60000 timeout when I set it to 120000 in my system properties
k

Ken Krugler

08/23/2021, 9:55 PM
Hi @User - for a next step, I would try building your own version of the jdbc client jar, with a higher timeout, to confirm that solves the problem.
g

Grace Walkuski

08/23/2021, 9:56 PM
Ok I’ll try that!
Whats the main class in the JDBC? I need to pick one when I package it as a jar
k

Ken Krugler

08/24/2021, 11:46 PM
I don’t think it has a main class… I just did a git clone of pinot, then
Copy code
cd pinot-clients/pinot-jdbc-client/
mvn package
and it built the
target/pinot-jdbc-client-0.8.0-SNAPSHOT.jar
file as expected.
So then if that jar is on your application’s class path (or you have it as a dependency for your project, and you build an uber jar) you’ll be able to use the client classes the same as before.
g

Grace Walkuski

08/24/2021, 11:48 PM
Ohhh ok cool!