推荐学习书目
› 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
Richard14
V2EX  ›  Python

FastAPI 请求提示 503,应该如何 debug?

  •  
  •   Richard14 · Jun 10, 2022 · 1339 views
    This topic created in 1571 days ago, the information mentioned may be changed or developed.

    遇到灵异情况,来问问万能的 v 友。

    fastapi 写了个一个接口,程序启动时调用是正常返回结果的,大概过几分钟到几十分分钟不等后就会开始反馈 503 。试着在业务代码里 try 捕捉了一下没有异常上浮,试着给 app 开启 debug 级别 log ,无异常信息。

    该 503 只影响单个接口,服务核心功能正常,其他接口业务正常。

    遇到这种情况应该怎么开始 debug 呢?

    ericls
        1
    ericls  
       Jun 10, 2022 via iPhone
    是谁返回的 503 ?
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   3031 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 19ms · UTC 11:14 · PVG 19:14 · LAX 04:14 · JFK 07:14
    ♥ Do have faith in what you're doing.