[Flask] uWSGI and Flask - Slow and varying response times

Aco Strkalj aco at miza.org
Thu Jul 7 11:04:17 EDT 2016


If it’s not too much work can you run it though gunicorn?


> On Jul 7, 2016, at 9:33 AM, Tim van der Linden <tim at shisaa.jp> wrote:
> 
> On Thu, 07 Jul 2016 17:35:12 +0800
> Unai Rodriguez <unai at sysbible.org> wrote:
> 
> Hi Unai (and everyone else!)
> 
>> Fantastic collaborative effort!!! :) 
> 
> Indeed. Thanks to all for giving a fresh set of eyes into this issue.
> A big factor, as Ziirish pointed out, seems to be the difference in clock speed indeed.
> 
> As Unai pointed out it still does not explain the difference in response.
> Maybe there is a lot of context switching going on ... ?
> 
> Another thing I noticed as well is the fact that on the server the profiler tells me a request is finished in ~700 ms (for example) but the browser has to wait a total of ~ 1100 ms before receiving back the data.
> 
> There seems to be something happening between Python being finished within those ~700 ms and uWSGI/Nginx generating a response back to the client (~ 400ms lost somewhere).
> 
> Maybe this is the cause for the difference in response rates. Python performance (yet slower slower than local) is stable, the response overhead varies.
> 
> I wonder what might be happening in uWSGI/Nginx after Python is finished with its work...
> 
>> -- unai
> 
> Cheers,
> Tim
> _______________________________________________
> Flask mailing list
> Flask at python.org
> https://mail.python.org/mailman/listinfo/flask



More information about the Flask mailing list