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

Alejo Arias alejoar at gmail.com
Wed Jul 6 06:19:42 EDT 2016


Is the DB hosted in the same server?

On 6 July 2016 at 12:16, Tim van der Linden <tim at shisaa.jp> wrote:

> On Wed, 06 Jul 2016 17:52:00 +0800
> Unai Rodriguez <unai at sysbible.org> wrote:
>
> > Hi Tim,
>
> Hi Unai
>
> Thanks for the response!
>
> > I think your top priority should be to get consistent results first and
> > for the that you want to stop all other activity on your production
> > server and benchmark your application alone. Would it be feasible to
> > declare downtime in all other apps for 30 minutes? Alternatively you
> > might want to run all apps on your prodution server somewhere else while
> > you benchmark your app.
> >
> > This will tell you if the inconsistencies come from the other apps, or
> > it is an issue with your code or server configuration.
>
> Very good suggestion and I just had the timing to do so. I allowed only,
> my local IP access to the server and nobody else. The server fell even more
> silent and no requests came in except mine.
>
> I ran the profiler again which gave me very similar results to before:
> average response time ~700 ms. Average response time on my local machine:
> ~200 ms (exact same database and code).
>
> So even when this beast of a server is fully isolated and only answers to
> my requests, it does so 3 to 4 times slower than on my development machine.
>
> From my perspective, if the code were the bottleneck then I would also get
> the same "slow" performance on my local machine ... no?
>
> My gut feeling says that there is some sort of misconfiguration going on.
>
> > -- unai
>
> Cheers,
> Tim
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/flask/attachments/20160706/848067f4/attachment.html>


More information about the Flask mailing list