Request failed with status code 504

Large queries time out after exactly 1 minute with error “Request failed with status code 504”. How do I fix this? Is there a specific config change I can make?


You can set the default query timeout by setting druid.server.http.defaultQueryTimeout and it can be overridden by setting timeout value in each query context.
Also, check this article for more tunings around queries returning large result set :


Thanks for the reply!
I have tried setting this in the broker as recommenced in the link, as well as trying the historical and common, and it still times out after 1 minute - I notice the default for this value is 300000 millis (5 mins) anyway, so I’m not sure what’s causing a 1 minute timeout.
I am using sql to query, rather than native Druid queries - not sure if this would make any difference?

Sql queries should not cause a different timeout, are you using the Druid web console to query ? And the sql query would get planned into a native query internally, you can try to set the timeout in the query context. Also check the broker logs to see what’s happening.