Slow Requests on Local Flask Server

前端 未结 9 1997
无人共我
无人共我 2020-12-02 05:38

Just starting to play around with Flask on a local server and I\'m noticing the request/response times are way slower than I feel they should be.

Just a simple serve

9条回答
  •  忘掉有多难
    2020-12-02 06:02

    I got this error when running on hosts other than localhost as well, so for some, different underlying problems may exhibit the same symptoms.

    I switched most of the things I've been using to Tornado, and anecdotally it's helped an amount. I've had a few slow page loads, but things seem generally more responsive. Also, very anecdotal, but I seem to notice that Flask alone will slow down over time, but Flask + Tornado less so. I imagine using Apache and mod_wsgi would make things even better, but Tornado's really simple to set up (see http://flask.pocoo.org/docs/deploying/others/).

    (Also, a related question: Flask app occasionally hanging)

提交回复
热议问题