flask_socket_io中报错RuntimeError: You need to use the eventlet server. See the Deployment section of the documentation for more information.的解决办法


最新的flask_socketio 使用的是python-socketio

如果在包中安装了gevent或evenlet,在服务器上使用时,就会报错

RuntimeError: You need to use the eventlet server. See the Deployment section of the documentation for more information

卸载gevent和evenlet有关的库,卸载后就好了

 

经测试发现,如果是用uwsgi启动,采用eventlet模式,process只能设置1个,且会造成线程堵塞,如果设置超过1个,也会报上面的错误

后来采用gunicorn解决


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM