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

Python 内存泄露怎么能快速诊断?

  •  
  •   SlipStupig · Jul 18, 2017 · 4188 views
    This topic created in 3231 days ago, the information mentioned may be changed or developed.

    我用 tornado 写了一个 API 服务器,但是貌似出现了内存泄露问题,内存一直在增长不释放,由于项目有点大,不可能用 memory_profile, 有什么办法可以可以发现到泄露点呢?

    2 replies    2017-07-19 11:11:02 +08:00
    keakon
        1
    keakon  
       Jul 19, 2017   ❤️ 1
    其实大多数时候没啥好办法,因为一般你写不出能内存泄露的代码,这些问题基本都是第三方库导致的。粗暴的话就每隔一段时间或处理一定请求后自动重启进程,非要找找可以参考这篇 http://www.jianshu.com/p/2d06a1a01cc3
    tryer3000
        2
    tryer3000  
       Jul 19, 2017   ❤️ 1
    flask 写 web app,开发环境开启 debug,每个未捕获的异常会长 4M 内存
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2826 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 466ea39e · 49ms · UTC 06:02 · PVG 14:02 · LAX 23:02 · JFK 02:02
    ♥ Do have faith in what you're doing.