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