Incubator-superset: Superset Visualizations are timing out after 60 seconds. Want to increase that. How can I implement it?

Created on 27 Sep 2018  路  14Comments  路  Source: apache/incubator-superset

Make sure these boxes are checked before submitting your issue - thank you!

  • [ ] I have checked the superset logs for python stacktraces and included it here as text if any
  • [ ] I have reproduced the issue with at least the latest released version of superset
  • [ ] I have checked the issue tracker for the same issue and I haven't found one similar

Superset version

Expected results

Actual results

Steps to reproduce

inactive

Most helpful comment

IMHO, most of the real world query for analytics will be running 60 sec+. How can the cap even exists?

All 14 comments

Hi All,
My visualizations are timing out after 60 seconds with an error message "Unexpected error." The query that supports the visualization runs for roughly 2-3 min. This is a complex join query. I want to increase the timeout settings of the visualizations. I tried setting the SUPERSET_WEBSERVER_TIMEOUT to 300 also changed the settings of the gunicorn aswell. @mistercrunch Please let me know how can I do that.

In superset config.py, you can set SUPERSET_WEBSERVER_TIMEOUT,or when you do superset runserver -t 120.Try it.

@qin4zhang
As mentioned in my comment I tried increasing the SUPERSET_WEBSERVER_TIMEOUT to 300 but nothing changed. Also the superset runserver -t didnot work

+1 on this issue, same problem here. Long queries run well in the SQL lab but not in graph views.
According to @abhioncbr on Gitter, il looks like the queries are not run in async mode from the graphs while they are from SQL lab.
In that case it would be a bug.
The user experience is quite blocking when using tools like Hive that often take more than the default 50 seconds.

@abhioncbr could the issue be related to this line ? https://github.com/apache/incubator-superset/blob/a1d867cf2f3e519c454cd33d60b9772f9c7551e2/superset/assets/src/chart/Chart.jsx#L179

I see @mistercrunch adjusted the loader rendering recently https://github.com/apache/incubator-superset/commit/aed774e18b26c737c0ba58d9b203a8d4a9840614 , and I have the impression that "50" is a hard coded timeout that should come from the config

I'm currently using Superset 0.28.1 and have the same issue.

I'm currently using Superset 0.28.1 and have the same issue.

This can be solved in making changes to file chartAction.js.html

export <span class="fstat-no" title="function not covered" >function runAnnotationQuery(annotation, <span class="cstat-no" title="statement not covered" >timeout = 60, <span class="cstat-no" title="statement not covered" >formData = null, <span class="cstat-no" title="statement not covered" >key) {</span></span></span></span>

You can increase the timeout, but ultimately the "explore view" and dashboard view are meant to be somewhat interactive and the "less than a few minutes" time frame is ok for those use cases. If the query takes more than that, say 5-15 minutes, it's pretty clear that it's either too big of a workload, or simply the wrong database engine to power data exploration or dashboarding use cases. For the Hive use-case, it'd be reasonable perhaps use Hive in a data pipeline to prepare/summarize the data further and load it in a more interactive database, or use Presto. The timeout setup, from an administrative standpoint, prevents users from shooting themselves in the foot.

You'll have to make sure any proxy or load balancer in front of Superset (if any) has longer timeouts setup than Superset itself. Typically web requests are expected to timeout in the 30-120 seconds time frame.

@CoryChaplin the <Loading size={}> refers to the image size of the loading spinner, totally unrelated.

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Has there been any new developments resolving the 'unexpected error' when a query runtime runs for too long?

IMHO, most of the real world query for analytics will be running 60 sec+. How can the cap even exists?

@swamy16 did you find how to extend the timeout?

SUPERSET_WEBSERVER_TIMEOUT =300 works for me

Was this page helpful?
0 / 5 - 0 ratings

Related issues

kalimuthu123 picture kalimuthu123  路  3Comments

eliab picture eliab  路  3Comments

deity-bram picture deity-bram  路  3Comments

amien90 picture amien90  路  3Comments

tmccartan picture tmccartan  路  3Comments