美文网首页
uwsgi与gevent

uwsgi与gevent

作者: playwolf719 | 来源:发表于2019-01-11 02:36 被阅读0次

    uwsgi 1.4之后,无缝支持gevent

    image.png

    uwsgi 1.9可使用相关命令,加载gevent模块

    image.png

    启动命令

    uwsgi --gevent 100 --gevent-monkey-patch --http :9090 -M  --processes 4 --wsgi-file wsgi.py
    

    注意!!

    1、注意单纯在代码里加import gevent。。。对uwsgi而无效
    2、使用gevent的话,lazy-app必须为true(多进程)

    相关链接

    https://uwsgi-docs-zh.readthedocs.io/zh_CN/latest/Gevent.html

    相关文章

      网友评论

          本文标题:uwsgi与gevent

          本文链接:https://www.haomeiwen.com/subject/ibhtdqtx.html