V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
推荐学习书目
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 · 2753 views
    This topic created in 1868 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   ·   Solana   ·   5829 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 66ms · UTC 02:42 · PVG 10:42 · LAX 19:42 · JFK 22:42
    ♥ Do have faith in what you're doing.