V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
推荐学习书目
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 · 2022-06-10 02:35:43 +08:00 · 686 次点击
    这是一个创建于 710 天前的主题,其中的信息可能已经有所发展或是发生改变。

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

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

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

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

    ericls
        1
    ericls  
       2022-06-10 02:46:47 +08:00 via iPhone
    是谁返回的 503 ?
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   869 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 23ms · UTC 22:04 · PVG 06:04 · LAX 15:04 · JFK 18:04
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.