req.stream.read() takes too long / Falcon Slow?

47 views
Skip to first unread message

dsh...@bandwidthx.com

unread,
Jan 6, 2017, 4:35:05 PM1/6/17
to Falcon Framework
I just started using the Falcon framework for micro services based on what I read about it.
I'm surprised that it's consistently taking over 1 second for just reading the json payload which is only about 1,500 characters.

payload = req.stream.read()

I put a print statement before and after the above and here's what I got:

'Time before read:', 1483732384.687121

'Time after  read:', 1483732385.688327


Can someone please tell me if there's a better way to read the request?

Thanks


dsh...@bandwidthx.com

unread,
Jan 6, 2017, 5:39:54 PM1/6/17
to Falcon Framework
A bit of observation since I posted the issue. My Json payload has 41 elements. And if drop any 15 elements, then it  takes just 1 millisecond to read. The weird thing is that if I drop 14 elements, it still takes 1 full second. There seem to be a tipping point. Is there any configuration setting?

dsh...@bandwidthx.com

unread,
Jan 6, 2017, 8:02:17 PM1/6/17
to Falcon Framework
After further investigation, I found that the problem is actually with uwsgi. But even changing different settings e.g. buffer-size for uwsgi did not help.


On Friday, January 6, 2017 at 1:35:05 PM UTC-8, dsh...@bandwidthx.com wrote:

Kurt G. | @kgriffs

unread,
Jan 24, 2017, 10:37:41 AM1/24/17
to Falcon Framework
Just curious, did you try another WSGI server such as gunicorn?
Reply all
Reply to author
Forward
0 new messages