New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Number of opened sockets grow unlimited #926
Comments
You should not use the dev server for anything but development/testing. |
Where do you see that I am using the dev server ? I don't think I am using it |
If you use See http://flask.pocoo.org/docs/deploying/ about what to actually use on your server. |
I have replaced app.run by tornado and got the same behaviour. (using http://flask.pocoo.org/docs/deploying/wsgi-standalone/#tornado). |
That's a little bit surprising. Do you get that behavior with gunicorn too? |
we are using pymongo + flask + gunicorn, and everything is ok. pymongo will maintain a connection pool, every MongoClient instance has a built-in connection pool. So, if you have too much running mongoclient instances, it may complain about too many open files. |
Hi |
Hi
I have a very small number of requests incoming on my server and yet the flask server always ends up getting stuck/hanging indefinitely.
I tracked down the problem to : the allowed number of files that the server opens reaches ulimit.
The flask server creates sockets one after the other and I don't know why it doesn't close them. I am not doing anything crazy, just rendering a page or putting a number in a mongo database
Any thoughts ?
See full issue here : http://stackoverflow.com/questions/20540129/ever-increasing-number-of-opened-sockets-on-python-web-server
(I don't know how issues work on github, first timer here ; I don't mind copying the full issue here if you prefer)
Thanks
The text was updated successfully, but these errors were encountered: