Got 504: Gateway time-out after a minute even with --timeout 600 gunicorn's param.
See original GitHub issueHey.
I changed the gunicorn parametters via env variables, but still getting 504 error during the Chart creation or SQL lab.
How to reproduce the bug
- Setup Trino ORM with Hive connector. Change
GUNICORN_KEEPALIVEparam to 600 in.env-non-devandsuperset_config.py. - Run the Superset with
docker-compose -f docker-compose-non-dev.yml up - Enter the docker container and check that params are passed with
ps... /usr/local/bin/python /usr/bin/gunicorn --bind 0.0.0.0:8088 ... --timeout 600 - Go to “Create new chart” in the web UI. Fill query params. Run the query.
- Get “504: Gateway time-out” after a minute of waiting.
Expected results
A chart should be shown with data from connectors even if my query was processing for 1m+.
Actual results
I got the 504 response after a minute.
Screenshots

Environment
- browser type and version: Safary, Chrome;
- superset version: the latest superset-image
Checklist
Make sure to follow these steps before submitting your issue - thank you!
- I have checked the superset logs for python stacktraces and included it here as text if there are 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. found this but closed and not helpful.
Additional context
If a query is finished in less than a minute - i can see my chart.
Issue Analytics
- State:
- Created a year ago
- Comments:8 (5 by maintainers)
Top Results From Across the Web
how to fix 504 gateway timeout error in Gunicorn
There are a few ways to fix a 504 gateway timeout error in Gunicorn with Django. One way is to increase the number...
Read more >504 Gateway Timeout — Django + Gunicorn + Nginx - Medium
Even after successfully deployment of project on AWS, when I upload a file after around 30 sec it shows 504 Gateway Timeout. I...
Read more >Gunicorn Documentation - Read the Docs
After receiving a restart signal, workers have this much time to finish serving requests. Workers still alive after the timeout (starting from ...
Read more >How to Fix 504 Gateway Timeout using Nginx - Easy Cloud
It is very common to see a 504 Gateway Timeout error using Nginx webserver. This timeout error is generated often by a number...
Read more >504 gateway timeout - ELB, Nginx, Gunicorn - Server Fault
The site is under ELB, nginx and gunicorn as a backend server. In nginx I configured following settings: proxy_connect_timeout 600s;
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

GUNICORN_TIMEOUT = https://docs.gunicorn.org/en/stable/settings.html#timeout GUNICORN_KEEPALIVE = https://docs.gunicorn.org/en/stable/settings.html#keepalive Both serve different purpose. I think you should set GUNICORN_TIMEOUT to a higher value for long running queries.
I don’t know anything about gunicorn, unfortunately.