Hi, everyone. After upgrading Metabase from I believe 51.x to 53.3 and Clickhouse driver to 1.53.1 (Releases · ClickHouse/metabase-clickhouse-driver · GitHub), queries executed on a Clickhouse database through Metabase UI sometimes execute normally in 1 second, sometimes take 20-30 seconds, and sometimes reach 1 minute of execution and this error is shown:
Your question took too long
We didn't get an answer back from your database in time, so we had to stop. You can try again in a minute, or if the problem persists, you can email an admin to let them know.
Why is this and can we at least increase this Metabase timeout to more than 60 seconds?
Our Clickhouse version is 22.1.3.7 which is old but it's the latest on FreeBSD and we can't upgrade it at the moment.
Thanks for any tips.
Do you have any SSH or some network latency between metabase and clickhouse? Can you share a snippet of the logs maybe metabase is waiting for a connection to be available to execute the query
Hi, Tony, there's haproxy between Metabase and Clickhouse, but it's fully operational.
Can this timeout be tweaked somehow, through an environment variable maybe? Or in the advanced section in Metabase DB config, the "Additional JDBC connection string options" field, which is now empty? The limit is obviously 60 seconds in our case, and looking at the error it seems Metabase stops the query at that point. Maybe it's the driver's own timeout in effect?
I just tried, no error was logged by Metabase to the log file when it showed the "your question took too long" error.
Rolled back to backed up DB & downgraded to previous MB + CH drivers - the problem went away.
Additionally, it seems MB 53.5 & driver 1.53.2 completely ignore http(s).proxyHost & http(s).proxyPort Java settings.