家里的电脑24小时跑爬虫,XP系统下Apache不稳定,三天两头重启,如何破?

2013-03-12 08:24:29 +08:00
 laoyuan
XP系统不能换,因为是在家里用的电脑。感觉无解,因为没啥规律,有时5天Apache才完蛋一次,有时一小时两次。。。。所以只能上虚拟机装Linux系统了?
在虚拟机里就跑Apache + PHP,或者Nginx + PHP,数据库MySQL放外边就行。。我机子上有VMware~




[Mon Mar 11 04:41:33 2013] [notice] Parent: child process exited with status 3221225477 -- Restarting.
[Mon Mar 11 04:41:35 2013] [notice] Apache/2.2.4 (Win32) PHP/5.2.11 configured -- resuming normal operations
[Mon Mar 11 04:41:35 2013] [notice] Server built: Jan 9 2007 23:17:20
[Mon Mar 11 04:41:35 2013] [notice] Parent: Created child process 135288
[Mon Mar 11 04:41:36 2013] [notice] Disabled use of AcceptEx() WinSock2 API
[Mon Mar 11 04:41:36 2013] [notice] Child 135288: Child process is running
[Mon Mar 11 04:41:36 2013] [notice] Child 135288: Acquired the start mutex.
[Mon Mar 11 04:41:36 2013] [notice] Child 135288: Starting 250 worker threads.
[Mon Mar 11 04:41:36 2013] [notice] Child 135288: Listening on port 80.
6455 次点击
所在节点    程序员
36 条回复
laoyuan
2013-03-12 09:07:47 +08:00
决定今天晚上先装个nginx试试再说!
wy315700
2013-03-12 09:08:33 +08:00
试试2003
for4
2013-03-12 09:26:04 +08:00
加个进程守护, 挂/死了自动重启进程
用PHP抓? 强烈建议改成NodeJS/Python/Golang
laoyuan
2013-03-12 09:34:01 +08:00
@for4

无奈啊,主要精力在业务上,写的程序就是得过且过~~
ergatea
2013-03-13 01:30:40 +08:00
虚拟机嘛
sohoer
2013-03-13 01:33:28 +08:00
@laoyuan 要不借个爬虫给你用用
bixuehujin
2013-03-13 01:42:23 +08:00
可以试试在命令行下跑PHP(如果方便的话)。
thbourlove
2013-03-13 09:57:15 +08:00
跑个爬虫还要开apache,我表示无法理解。。
sarices
2013-03-13 10:42:18 +08:00
对啊,不能命令行运行吗?
laoyuan
2013-03-13 11:03:00 +08:00
命令行就不会重启么。。。。
laoyuan
2013-03-13 11:03:54 +08:00
@thbourlove
Nginx还可以接受吧?
hulk
2013-03-13 12:54:05 +08:00
@laoyuan 。。。命令行哪来的重启..
laoyuan
2013-03-13 15:05:32 +08:00
@hulk 啊哈哈我明白了,命令行方式不需要apache对吧!!
davidzhang
2013-03-13 15:10:53 +08:00
还是试试nginx吧
davidzhang
2013-03-13 15:14:32 +08:00
@thbourlove 哈哈,你说的在理,我也不明白,爬虫用开apache,我就知道用数据库就好了
shiny
2013-03-13 16:04:33 +08:00
我有个想法,就是用树莓派来跑爬虫,还省电。
molinxx
2013-03-13 16:07:05 +08:00
apache这东西在win下真心不行。。。
sohoer
2013-03-13 18:18:50 +08:00
@shiny 已经买树莓派了,看看我的采集器在树莓派上跑得欢不欢。
bengle
2013-03-13 18:50:27 +08:00
重装系统ubuntu
laoyuan
2013-03-13 19:05:53 +08:00
@sohoer 听说树莓派不大稳定,会死机,你当小白鼠先~

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/62654

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX