You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2022/05/27 19:32:10 UTC

[GitHub] [superset] mdeshmu commented on issue #16742: Charts in dashboards are subject to frequent errors with Chrome users

mdeshmu commented on issue #16742:
URL: https://github.com/apache/superset/issues/16742#issuecomment-1139968845

   @ValentinC-BR @ShimiBaliti @vivek-kandhvar @Pinimo I was getting frequent 502 errors during loading of charts in my dashboard.
   
   This is how traffic flows from my superset setup: AWS ALB --> Gunicorn --> Superset app
   I am using official superset docker image.
   
   I modified timeout settings i.e. GUNICORN_TIMEOUT and SUPERSET_WEBSERVER_TIMEOUT but it didn't resolve the problem.
   I have already increased SERVER_WORKER_AMOUNT to 8 and using default thread value of 20 but it didn't resolve the issue.
   My ECS task cpu/memory are underutilized so scaling is not a cause of the problem. 
   
   Finally, I saw this blog which says solution is to keep Gunicorn --keep-alive more than alb idle timeout: https://www.tessian.com/blog/how-to-fix-http-502-errors/
   
   Default value for --keep-alive is 2. Even Gunicorn's official documentation here https://docs.gunicorn.org/en/stable/settings.html#keepalive says:
   "Generally set in the 1-5 seconds range for servers with direct connection to the client (e.g. when you don’t have separate load balancer). When gunicorn is deployed behind a load balancer, it often makes sense to set this to a higher value."
   
   But run-server.sh in official docker image doesn't has an option for setting Gunicorn's --keep-alive to a custom value.
   So I added this line in local copy of run-server.sh
   	--keep-alive ${GUNICORN_KEEPALIVE:-65}
   and created a custom image by overwriting run-server.sh file in official image. This finally solved my problem.
   
   I hope this helps people with similar setup as mine.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org