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

跑多进程导致服务器cpu、内存跑满死机?

  •  
  •   wuxiaolin · Mar 18, 2013 · 4911 views
    This topic created in 4829 days ago, the information mentioned may be changed or developed.
    from multiprocessing import Pool
    我代码里用该模块开启多进程,在进程下分别开启多线程进行数据的采集。
    然后现在出现一个情况,我每分钟去跑一次这个采集的程序,每一分钟都会有线程卡死在那里不会自己关闭,到底什么情况下会出现卡死,不是一出现错误就会自己kill掉的么?
    1 replies    1970-01-01 08:00:00 +08:00
    jerrytian
        1
    jerrytian  
       Mar 18, 2013
    Python不熟,凭其他平台上的并发开发经验,最常见的就是死锁,IO等待。

    至少可以先做下程序的dump,看看死掉的进程/线程到底挂在哪?是自己的应用代码部分还是系统代码部分?然后再具体分析。

    推荐阅读: http://blog.stackoverflow.com/2010/10/asking-better-questions/
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2630 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 27ms · UTC 15:40 · PVG 23:40 · LAX 08:40 · JFK 11:40
    ♥ Do have faith in what you're doing.