Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 57ce67b

Browse files
committed
add guardian
1 parent e7263fa commit 57ce67b

File tree

2 files changed

+33
-25
lines changed

2 files changed

+33
-25
lines changed

‎.idea/workspace.xml‎

Lines changed: 27 additions & 19 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎guardian/README.txt‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
监控思路:
2-
1. 通过判断cpu 和内存占用率 然后决定是否要开始kill 程序
3-
2. kill 程序 需要获取到pid pid可通过 指定查找程序 name & 程序所在目录
1+
**主要问题**:现在有个爬虫程序摆在我面前,它长时间爬着爬着爬虫程序和数据库的内存就会增大,因影响爬虫的继续和电脑或服务器的正常使用。
42

5-
6-
7-
win下 tasklisst查看 程序pid taskkill /pid /f 杀死程序
3+
**解决思路**:
4+
* 1. 通过判断cpu 和内存占用率 然后决定是否要杀死爬虫程序和数据库服务进程
5+
* 2. win下 通过 tasklisst 命令获取到我们需要的pid 然后杀死进程
6+
* 3. 重启爬虫程序和数据库
7+
* 4. 做个时间延迟并循环判断

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /