Flask on Heroku: request.form is incredibly slow with large POST data?
问题 I'm running a Flask app on Heroku using gunicorn with eventlet workers. A particular route on my app frequently receives POST data (x-www-form-urlencoded) with some fairly chunky fields -- on the order of 500KB at most. This works fine when running locally, but on Heroku, requests to that route takes anywhere from 5 to 30 seconds to complete -- and almost 100% of the time is spent in the first access to request.form: t = time.time() action = str(request.form['action']) dt = time.time() - t #