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

Unai Rodriguez unai at sysbible.org
Wed Jul 6 05:52:00 EDT 2016


Hi Tim,

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.  

-- unai

On Wed, Jul 6, 2016, at 05:02 PM, Tim van der Linden wrote:
> On Wed, 6 Jul 2016 10:26:28 +0200
> Alejo Arias <alejoar at gmail.com> wrote:
> 
> Hi Alejo
> 
> Thanks for the reply.
> 
> > Can you ssh into the server and make requests to localhost? (for example
> > with httpie or curl) If those show no delay you have a connection issue.
> 
> Good point. However, the response time comes from the Werkzeug profiler
> directly done on the production server so there is no network overhead.
> 
> > Other thing I can think of is the server might be running other heavy
> > processes. Maybe something related to log processing that's consuming lots
> > of resources, but with such a beast of a server I doubt it.
> 
> Hmm, well uWSGI and PostgreSQL have quite the free range on the server.
> There is not much else going on on that machine.
> 
> > Nothing comes to mind that might be causing this that's directly related to
> > python or flask other than the code itself.
> 
> But if it was the coding, it would also show up on development profiling,
> no?
> 
> Thanks for your insight!
> 
> > Regards,
> > Alejo
> 
> Cheers,
> Tim
> _______________________________________________
> Flask mailing list
> Flask at python.org
> https://mail.python.org/mailman/listinfo/flask


More information about the Flask mailing list