首页
注册
登录
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
V2EX
›
Python
selenium 爬虫会产生僵尸进程
guoguobaba
·
2023-09-08 11:13:01 +08:00
· 1097 次点击
这是一个创建于 389 天前的主题,其中的信息可能已经有所发展或是发生改变。
用 django 写了一个爬虫的服务,每执行一次就产生两个僵尸进程,需要定时重启 django 才行,如何解决
已经调用过 driver.close() driver.quite() 了
搜了一下网上很多这种问题,但是没有解决方案
1 ? 00:00:00 python
7 ? 00:00:03 python
19 ? 00:00:00 firefox-esr <defunct>
266 ? 00:00:00 firefox-esr <defunct>
00:00:00
Python
defunct
django
2 条回复
•
2023-09-08 11:51:29 +08:00
1
fatbear
2023-09-08 11:27:07 +08:00
看你的进程号 是在 docker 内跑的吗, 如果是在 docker 内跑的,需要加--init 的参数,或者用 bash 套一层,在 bash 里面在调 python 执行脚本
2
guoguobaba
OP
2023-09-08 11:51:29 +08:00
@
fatbear
谢谢,k8s 里,dockerfile 加了
ENTRYPOINT ["/usr/bin/tini", "--"]
就 ok 了
关于
·
帮助文档
·
博客
·
API
·
FAQ
·
实用小工具
·
754 人在线
最高记录 6679
·
Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 28ms ·
UTC 21:54
·
PVG 05:54
·
LAX 14:54
·
JFK 17:54
Developed with
CodeLauncher
♥ Do have faith in what you're doing.