推荐学习书目
› Learn Python the Hard Way
Python Sites
› PyPI - Python Package Index
› http://diveintopython.org/toc/index.html
› Pocoo
值得关注的项目
› PyPy
› Celery
› Jinja2
› Read the Docs
› gevent
› pyenv
› virtualenv
› Stackless Python
› Beautiful Soup
› 结巴中文分词
› Green Unicorn
› Sentry
› Shovel
› Pyflakes
› pytest
Python 编程
› pep8 Checker
Styles
› PEP 8
› Google Python Style Guide
› Code Style from The Hitchhiker's Guide
xxcc
V2EX  ›  Python

求教, Django 项目中使用了 gRPC,发现平均每三到四次就会有一次响应时间 10s,打印时间发现是 channel.close()这一步花费了 10s

  •  
  •   xxcc · Mar 26, 2021 · 3102 views
    This topic created in 2011 days ago, the information mentioned may be changed or developed.
    1 replies  •  2021-03-26 15:38:46 +08:00
    ourslay
        1
    ourslay  
       Mar 26, 2021 via iPhone
    建议 channel 不要频繁打开关闭。本身是多路复用且线程安全本身。伴随着应用的生命周期一块管理。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   799 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 25ms · UTC 20:51 · PVG 04:51 · LAX 13:51 · JFK 16:51
    ♥ Do have faith in what you're doing.