This message was deleted.
# troubleshooting
s
This message was deleted.
g
with a large resultset like that, you could be hitting timeouts leading to truncation of results
see this section of the docs for info on errors in the SQL API: https://druid.apache.org/docs/latest/querying/sql-api.html#errors
this part:
As a caller, it is important that you properly handle response truncation. This is easy for the object and array formats, since truncated responses will be invalid JSON. For the line-oriented formats, you should check the trailer they all include: one blank line at the end of the result set. If you detect a truncated response, either through a JSON parsing error or through a missing trailing newline, you should assume the response was not fully delivered due to an error.
with CSV, a complete API response always includes a trailing blank line — if you don't see that then it means the response got cut off due to error/timeout. you can increase your timeout in that case
s
What and where are those config which I can change to get the whole query response instead of truncated response @Gian Merlino? I could not find much from the documentation actually..
g
i'm just guessing it's timeout-related, which is described here under property
timeout
https://druid.apache.org/docs/latest/querying/query-context.html
s
Ohh. unfortunately that does not work when I pass the
timeout
context parameter with the API call. Still it gets only part of data out of Druid
Even using timeout of 0 we are getting below error -
Copy code
AvaticaClientRuntimeException: Remote driver error: QueryTimeoutException: url[<http://10.111.125.60:8083/druid/v2/>] timed out. Error -1 (00000) UNKNOWN

org.apache.druid.query.QueryTimeoutException: url[<http://10.XXX.XXX.XX:8083/druid/v2/>] timed out
	at org.apache.druid.client.JsonParserIterator.timeoutQuery(JsonParserIterator.java:204)
	at org.apache.druid.client.JsonParserIterator.next(JsonParserIterator.java:119)
	at org.apache.druid.java.util.common.guava.BaseSequence.makeYielder(BaseSequence.java:90)
	at org.apache.druid.java.util.common.guava.BaseSequence.access$000(BaseSequence.java:27)
	at org.apache.druid.java.util.common.guava.BaseSequence$1.next(BaseSequence.java:114)
	at org.apache.druid.java.util.common.guava.MergeSequence.makeYielder(MergeSequence.java:1
I have infact increased the timeout on broker, historical, MM to 20 mins. Still failing.. 😞
g
hmm. about how long is it failing after?
i wonder if you are running into one of the other things mentioned on https://druid.apache.org/docs/latest/configuration/index.html such as
druid.broker.http.readTimeout
(default PT15M) or
druid.router.http.readTimeout
(default PT8M)
s
Its failing approx after 5 mins of
g
Yeah that does sound like a timeout thing! Try setting longer timeout in query context, like, if 15 mins is OK then set
timeout: 900000
(15 minutes) and raise
druid.router.http.readTimeout = PT15M