New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adjust the error message of "Your question took too long" #12423
Comments
Just to add another case: We have deployed Metabase on a Azure App Service, and App Services have a hard timeout of 230 seconds which is not possible to increase. I wonder if a alternative solution would be to allow running queries in the background somehow? I have some queries that can take 10-20 minutes to run, and for that long queries I dont want to wait in the UI anyway. Instead I could start the query in some background/task list, and then come back later and list the queries, their status and if available their results. This would extend the type of queries possible to run through metabase, especially for analytics databases such as Snowflake or BigQuery. |
We are experiencing the same issue, due to Cloudflare's 100s limit (reference here). |
It is not possible to change Cloudflare 100s limit without 'enterprise' plan. |
Hello. Is there any progress on this? A single option "keep connection alive on long-running queries (send newline every 1s)" on metabase admin would be nice (also as mentioned in previous comment almost 11m before). |
This is also causing difficulties for us: with the ALBs being shared between several services. Increasing idle timeouts/read timeouts across the board doesn't really work for us here and makes Metabase a special case - instead we're just dealing with a hard limit. If there was still an option of sending the keep alives we'd definitely enable it. |
I have come across this issue and followed the process.
I'm not sure what I should be checking for in the response headers Below is my diagnostic info
|
Please use the forum for questions and troubleshooting: https://discourse.metabase.com/ You're not writing how long time it takes before you're getting the timeout. Remember to restart Nginx after making the change. 3600 seconds seems excessive. 600 or 1200 should be plenty (for most). You are setting the timeouts for the |
Is this problem will be addressed in future releases? |
Hello I also think that this should be addressed. For example AWS ALB max idle timeout is 4000 seconds. This essentially means that if metabase runs on AWS behind ALB (which is pretty standard setup) you cannot use metabase with queries whose runtime exceeds 4000 seconds (~1 hr and 6 minutes) and we need to query Redshift directly. Also in AWS configuration of the timeout is possible only per load balancer. Typically you run multiple applications on the same load balancer and each gets unique target group. Since you cannot configure Would be good if optionally we could just switch metabase front to just poll for cached results on backend with short-lived connections, instead of waiting for those results on a long-running open connection. |
Any chance this is on the roadmap? |
I'll add my voice in saying that the existing workarounds here are not sufficient, as sometimes you do not control the proxy (a la Cloudflare). I'd typically try to break up concerns here, with the frontend kicking off long running background jobs like fetching a query and then polling regularly for the result. The long running background job in turn could listen for keepalives from the frontend and cancel if the heartbeat stops. But relying on very long running processes from the frontend all the way to the database and back seems like perhaps a mistake, and certainly is causing some pain for us because we cannot get around a hard 100 second timeout via Cloudflare. |
This comment was marked as off-topic.
This comment was marked as off-topic.
I am experiencing the same problem changing cloudflare is not possible for me. Use websocket to send these long running query might be a solution |
We are experiencing the same issue of 524 timeout error after 100s with |
Same here, using metabase on another hosting provider that does not allow to control proxy. Is there any work in progress about this? |
@alice-telescoop, even if we adjust the message, the hosting provider will cut the connection and leave the user without the answer. Why can't you change the hosting provider if the queries are slow? |
Our metabase is a tools for the few business developpers of our small team. It would take quite a lot of time to change the hosting provider that we don't necessarily have. I was actually directed to this issue by the hosting provider itself. I realize by reading your answer that the issue only aims at changing the message. Is there any issue or planned work on having some sorte of keep-alive system? |
Describe the bug
There's many benefits from the new connection handling in 0.35, like better pool handling, faster and can handle much higher load, but it also means that it's not sending a
newline
every second anymore, which before 0.35 kept the connection alive.This mean it's now needed to adjust timeouts of reverse-proxy/load-balancer, when a question with a query time exceeds the timeout of the proxy.
Otherwise the proxy will close the connection, which will show the error in dashboard/question:
Workaround
Change the timeout of the reverse-proxy/load-balancer, so the connection between the user/browser and Metabase isn't closed before results are returned.
Unsure which proxy might be closing the connection, then use the browser developer Network-tab to see the response headers of the failing request.
To Reproduce
select pg_sleep(65);
or MySQLselect sleep(65);
)There will also be an error in log, which says that Metabase has lost the connection to the user/browser, since the proxy in between has closed the connection:
ERROR async.streaming-response :: Error determining whether HTTP request was canceled
Expected behavior
Either of these would probably help:
newline
keepalive method, it might not be worth it.Information about your Metabase Installation:
Metabase 0.35.3 behind a reverse-proxy with a timeout of 60 seconds
Additional context
Based on #12335 and https://discourse.metabase.com/t/your-question-took-too-long-0-35-1/9621
Giving it P2, since this seems like it might be a common problem
Related #11463
The Elastic BeanStalk image has hardcoded timeout of 600 seconds (10 minutes), which should probably be changed to a higher number, since that means it's not possible to run queries for longer than 10 minutes on EBS no matter if the load balancer has a higher timeout.
It is possible to manually change that, but every time the instance is upgraded, then those changes need to be manually applied again.
⬇️ Please click the 👍 reaction instead of leaving a
+1
orupdate?
commentThe text was updated successfully, but these errors were encountered: