python - flask application timeout with amazon load balancer -
i'm trying use flask application behind amazon load balancer , flask threads keep timing out. appears load balancer sending connection: keep-alive
header , causing flask process never return (or takes long time). gunicorn in front processes killed , new ones started. tried using uwsgi , exposign flask app directly (no wrapper). result in flask process not responding.
i see nothing in flask docs make ignore header. i'm @ loss else can flask fix problem.
curl , direct connections machine work fine, via load balancer causing problem. load balancer doesn't appear doing wrong , use several other stacks.
the solution have using gunicorn wrapper around flask application. worker_class
using eventlet
several workers. combination seems stable , responsive. gunicorn configured https.
i assume defect in flask causes problem , effective workaround.
Comments
Post a Comment