2 ms·
I find this incredibly interesting. I have a production server running a Flask app, performance is not stellar, and I've been meaning to try running it with Pyp
by nubela 14y ago
I find this incredibly interesting. I have a production server running a Flask app, performance is not stellar, and I've been meaning to try running it with Pypy w/ a web server, but I have yet to find a good resource for this. Anyone has any tips? Seems kinda counterintuitive with all these performance numbers with Pypy > Cpython when I can't even run it in production.
- pinneycolton 14y agoCan you elaborate on what is not performing well?
- nigma 14y agoAre you sure your app is not db or I/O bound? I would suggest giving https://github.com/mgood/flask-debugtoolbar https://github.com/mgood/flask-debugtoolbar a try and getting some numbers before making a switch.
- dalke 14y agoIt's strange that you have a problem with Flask in production. What I've heard, there shouldn't be much of a problem with it. It should easily be able to handle 1,000 basic requests per second. Have you done any performance analysis to figure out where the bottlenecks might be? Have you tried the flask-debugtoolbar (http://pypi.python.org/pypi/Flask-DebugToolbar http://pypi.python.org/pypi/Flask-DebugToolbar)? How many requests do you get? What's the load average of the process? Is there an un-indexed SQL query you don't know about? In the most extreme case, have you put a debugging sleep(1) call in your code which you've forgotten to remove? Without knowing more about where your Flask app is being bogged down, it's not that worthwhile to switch to pypy.