Why the state invariant

103 views
Skip to first unread message

manbuheiniu

unread,
Jan 28, 2015, 4:36:33 AM1/28/15
to pyspide...@googlegroups.com

查看任务一直是这样,统计显示最近一小时也没有新的任务处理完。请问怎么查看是什么原因呢?

Binux

unread,
Jan 28, 2015, 8:18:32 AM1/28/15
to pyspide...@googlegroups.com
看日志

On Wednesday, January 28, 2015 at 5:36:33 PM UTC+8, manbuheiniu wrote:

查看任务一直是这样,统计显示最近一小时也没有新的任务处理完。请问怎么查看是什么原因呢?

manbuheiniu

unread,
Jan 28, 2015, 7:16:22 PM1/28/15
to pyspide...@googlegroups.com
请问日志文件在哪呢?我查看运行程序的终端显示的全都是[I 150129 08:12:20 _internal:87] 106.186.122.22 - - [29/Jan/2015 08:12:20] "GET /counter?time=1d&type=sum HTTP/1.1" 200 -
这种web访问日志,其它的日志应该是在这之前,查看不到。刚重启了一下pyspider,所以任务都正常了,也开始进行其它新任务的抓取。请问怎么把错误日志保存下来呢?

在 2015年1月28日星期三 UTC+8下午9:18:32,Binux写道:

manbuheiniu

unread,
Jan 28, 2015, 7:19:08 PM1/28/15
to pyspide...@googlegroups.com
重启后运行了一分钟左右,又出现了大量的ACTIVE任务,查看运行程序的终端输出日志很多是[I 150129 08:16:00 scheduler:632] select chinaunix_tmp3:ab5087ba6cefe0da31794afcf90980cd http://blog.chinaunix.net/uid-85338-id-3069385.html,请问这是什么情况呢?应该怎么处理?



在 2015年1月28日星期三 UTC+8下午9:18:32,Binux写道:
看日志

manbuheiniu

unread,
Jan 28, 2015, 7:38:50 PM1/28/15
to pyspide...@googlegroups.com
我刚把日志重定向到一个文件分析了分析,发现在出现select日志之前有错误日志输出,日志内容如下:
[I 150129 08:27:55 processor:153] process chinaunix_tmp3:e4ab60cfab69905ecc7497acb6ec5064 http://blog.chinaunix.net/technology.html -> [200] len:50631 -> result:None fol:103 msg:0 err:None
[I 150129 08:28:01 _internal:87] 106.186.112.20 - - [29/Jan/2015 08:28:01] "GET /counter?time=1h&type=sum HTTP/1.1" 200 -
[D 150129 08:28:02 scheduler:83] project: chinaunix_tmp3 updated.
[D 150129 08:28:02 scheduler:83] project: cnblog_cid updated.
[D 150129 08:28:02 scheduler:83] project: chinaunix_blog updated.
[D 150129 08:28:02 scheduler:83] project: chinaunix_blogs updated.
[I 150129 08:28:02 tornado_fetcher:149] [200] data:,_on_get_info 0s
[D 150129 08:28:02 scheduler:83] project: tmp_dingshi updated.
[E 150129 08:28:02 scheduler:557] not processing pack: chinaunix_tmp3:071823499271a6148cd3f121ae3851e3 http://blog.chinaunix.net/blog/rss/uid/30104303.html
[E 150129 08:28:02 scheduler:557] not processing pack: chinaunix_tmp3:b92632b05a15178c0ae845c2a02bc72f http://blog.chinaunix.net/zt/1009/opengl_1009881.shtml
[E 150129 08:28:02 scheduler:557] not processing pack: chinaunix_tmp3:065c6111fe56b3ab58b52d3156ed2148 http://blog.chinaunix.net/uid-29734431-id-4741146.html
[E 150129 08:28:02 scheduler:557] not processing pack: chinaunix_tmp3:a4761e8ea0f9cb7f74bd2494e89b6254 http://blog.chinaunix.net/uid-28248011-id-3435557.html
[E 150129 08:28:02 scheduler:557] not processing pack: chinaunix_tmp3:be5d85d1c903c1c1a81b301013d10911 http://blog.chinaunix.net/uid-28248011-id-3483216.html
[E 150129 08:28:02 scheduler:557] not processing pack: chinaunix_tmp3:b09a45def42de52286921cd5852ffa77 http://blog.chinaunix.net/uid-28248011-id-3511543.html
[E 150129 08:28:02 scheduler:557] not processing pack: chinaunix_tmp3:cb8e315556d6b47bd0cb3e8fe95b345c http://blog.chinaunix.net/uid-28248011-id-3405992.html
[E 150129 08:28:02 scheduler:557] not processing pack: chinaunix_tmp3:f5308a3597a30e83a058e80d60ca2c59 http://blog.chinaunix.net/member/profile/uid/29954619.html
[E 150129 08:28:02 scheduler:557] not processing pack: chinaunix_tmp3:e7ff6a07ee4d60d8e94a9136761d80c8 http://blog.chinaunix.net/uid/29752661.html
[E 150129 08:28:02 scheduler:557] not processing pack: chinaunix_tmp3:6f9675a7135926b1ac8b94a153af9a55 http://blog.chinaunix.net/uid/24953145/year-2013-list-1.html
[E 150129 08:28:02 scheduler:557] not processing pack: chinaunix_tmp3:311fdf347939776a93f9d4ccdb4368dd http://blog.chinaunix.net/uid-7207844-id-4346185.html
[E 150129 08:28:02 scheduler:557] not processing pack: chinaunix_tmp3:cc839a2c291d7d1d7c1893e26655ae2a http://blog.chinaunix.net/uid/29804797/abstract/2.html
[E 150129 08:28:02 scheduler:557] not processing pack: chinaunix_tmp3:a037c3d97490e47fdb8c4c1fb8021b6e http://blog.chinaunix.net/uid/30061622/abstract/1.html
[I 150129 08:28:02 tornado_fetcher:149] [200] data:,_on_get_info 0s
[E 150129 08:28:02 scheduler:557] not processing pack: chinaunix_tmp3:6ee3779e317e8af807b5b6f0978d8f2c http://blog.chinaunix.net/uid/29804797/year-201408-abstract-1.html
[E 150129 08:28:02 scheduler:557] not processing pack: chinaunix_tmp3:9da0127aef2b8494027c3abe020d6145 http://blog.chinaunix.net/uid/29804797/year-201409-abstract-1.html
[E 150129 08:28:02 scheduler:557] not processing pack: chinaunix_tmp3:ceda22f8c3ff66a7dd44d12423ac484e http://blog.chinaunix.net/uid/29804797/year-2014-list-6.html
[E 150129 08:28:02 scheduler:557] not processing pack: chinaunix_tmp3:aa3b517750ca8854e22c0d70e2b60270 http://blog.chinaunix.net/uid-30036393-id-4730462.html
[E 150129 08:28:02 scheduler:557] not processing pack: chinaunix_tmp3:2e8830b271f627cc1ed4dcac87dce9da http://blog.chinaunix.net/uid/26896862/year-2013-list-8.html
[E 150129 08:28:02 scheduler:557] not processing pack: chinaunix_tmp3:6e785448564a4c73bde0e39f5d335175 http://blog.chinaunix.net/uid-28248011-id-3437699.html
[E 150129 08:28:02 scheduler:557] not processing pack: chinaunix_tmp3:69dbc58932a0d13b4ade4d3ed60e7773 http://blog.chinaunix.net/uid/30104303/year-201501-list-1.html
[E 150129 08:28:02 scheduler:557] not processing pack: chinaunix_tmp3:739ed4bae6ffdea8018b5fd286a3db1b http://blog.chinaunix.net/uid/29953825/cid-202129-list-1.html
[E 150129 08:28:02 scheduler:557] not processing pack: chinaunix_tmp3:e593af52ed65d419c20e8239d068c891 http://blog.chinaunix.net/member/profile/uid/30061622.html
[E 150129 08:28:02 scheduler:557] not processing pack: chinaunix_tmp3:069adf22ea85aadf44f43a8647222237 http://blog.chinaunix.net/uid-25498312-id-3022966.html
[E 150129 08:28:02 scheduler:557] not processing pack: chinaunix_tmp3:b9d62521dcb8c857889e5a4f7f26316b http://blog.chinaunix.net/uid-28248011-id-4556681.html
[I 150129 08:28:02 tornado_fetcher:149] [200] data:,_on_get_info 0s
[E 150129 08:28:02 scheduler:557] not processing pack: chinaunix_tmp3:71eeaae4b800a3d23efbaddc7f16427b http://blog.chinaunix.net/uid-28248011-id-4529910.html
[E 150129 08:28:02 scheduler:557] not processing pack: chinaunix_tmp3:1c00a94158cb89175e368f5f9fa3b8f8 http://blog.chinaunix.net/uid-28239930-id-4350222.html
[E 150129 08:28:02 scheduler:557] not processing pack: chinaunix_tmp3:21c28c4a71419bb63512124f67e33ad3 http://blog.chinaunix.net/uid-29743029-id-4345365.html
[E 150129 08:28:02 scheduler:557] not processing pack: chinaunix_tmp3:815fbfc414036010a87bd0f0367bd8dc http://blog.chinaunix.net/uid-7207844-id-4346032.html
[E 150129 08:28:02 scheduler:557] not processing pack: chinaunix_tmp3:bda110f9f5ed5059e5ea6f6daa9e0f16 http://blog.chinaunix.net/uid-28248011-id-3394232.html
[E 150129 08:28:02 scheduler:557] not processing pack: chinaunix_tmp3:c7af187f1cf79eb895d3cfb3cd360147 http://blog.chinaunix.net/uid-28248011-id-3420082.html
[E 150129 08:28:02 scheduler:557] not processing pack: chinaunix_tmp3:e3e3bf1c90c5aca95bac60722cc829b7 http://blog.chinaunix.net/uid-26896817-id-4577295.html
[E 150129 08:28:02 scheduler:557] not processing pack: chinaunix_tmp3:1cda0c999e0cee8ca0a6a1489a96058e http://blog.chinaunix.net/uid-25498312-id-375453.html
[E 150129 08:28:02 scheduler:557] not processing pack: chinaunix_tmp3:26c2f475419fc4ca02b61f1752e421ef http://blog.chinaunix.net/uid-25498312-id-358858.html
[E 150129 08:28:02 scheduler:557] not processing pack: chinaunix_tmp3:0dd1fe9590c4b6b856891783a9d9ed5e http://blog.chinaunix.net/uid-28248011-id-3419168.html
[E 150129 08:28:02 scheduler:557] not processing pack: chinaunix_tmp3:901cf4d645a647fab470f713a872ef71 http://blog.chinaunix.net/uid-25498312-id-376159.html
[I 150129 08:28:02 tornado_fetcher:149] [200] data:,_on_get_info 0s
[E 150129 08:28:02 scheduler:557] not processing pack: chinaunix_tmp3:345808b32402ec3f4d9547437c68ce5a http://blog.chinaunix.net/uid-28248011-id-3511546.html
[E 150129 08:28:02 scheduler:557] not processing pack: chinaunix_tmp3:b6ff51ec150266d59379e1d65e5da866 http://blog.chinaunix.net/uid-28248011-id-3388650.html
[E 150129 08:28:02 scheduler:557] not processing pack: chinaunix_tmp3:0c38f91fb1982fdcefb51bcbc80eb247 http://blog.chinaunix.net/uid-10537496-id-462472.html

看日志好像有更新项目的操作,但是我在控制平台没有更新项目,是程序自动显示更新了,不知道为什么。




在 2015年1月28日星期三 UTC+8下午9:18:32,Binux写道:
看日志

Roy Binux

unread,
Jan 28, 2015, 8:31:09 PM1/28/15
to manbuheiniu, pyspide...@googlegroups.com
和 updated 没关系,启动的时候就是 updated 的。
你怎么部署的。

--
You received this message because you are subscribed to the Google Groups "pyspider-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pyspider-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pyspider-users/10640a13-f51e-4349-84c1-1276275db1ec%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

manbuheiniu

unread,
Jan 28, 2015, 9:08:05 PM1/28/15
to pyspide...@googlegroups.com, qiaozh...@gmail.com, r...@binux.me
现在是单机,不过使用的是mysql+rabbitmq独立模式。之前是三台做的分布式,后来感觉三台速度也不快就只开了这一台。

在 2015年1月29日星期四 UTC+8上午9:31:09,Roy Binux写道:

manbuheiniu

unread,
Jan 28, 2015, 9:08:54 PM1/28/15
to pyspide...@googlegroups.com, qiaozh...@gmail.com, r...@binux.me
程序启动的时候项目已经updated了,我说的这个updated是项目运行几分钟后又出现的


在 2015年1月29日星期四 UTC+8上午9:31:09,Roy Binux写道:
和 updated 没关系,启动的时候就是 updated 的。
你怎么部署的。

Roy Binux

unread,
Jan 28, 2015, 9:50:14 PM1/28/15
to manbuheiniu, pyspide...@googlegroups.com
把你部署的启动命令我看看,每个组件运行了几个实例

manbuheiniu

unread,
Jan 28, 2015, 10:07:04 PM1/28/15
to pyspide...@googlegroups.com, qiaozh...@gmail.com, r...@binux.me
config.ini内容
{
    "taskdb": "mysql+taskdb://pyspider:123...@sfsfsdfsfsf.mysql.rds.aliyuncs.com:3306/taskdb",
    "projectdb": "mysql+projectdb://pyspider:123...@sfsfsdfsfsf.mysql.rds.aliyuncs.com:3306/pyspider",
    "resultdb": "mysql+resultdb://pyspider:123...@sfsfsdfsfsf.mysql.rds.aliyuncs.com:3306/result",
    "amqp_url": "amqp://pyspider:123456@localhost:5672/%2F",
    "webui": {
        "port": 5001,
        "username": "admin",
        "password": "123456",
        "need_auth": "true"
    }
}
./run.py -c config.ini  这是程序的启动命令 只开了这一台服务器。

rabbitmq用官方的教程安装的,安装完添加了个用户并设置成管理员来使用。
mysql使用的是阿里云的云数据库



在 2015年1月29日星期四 UTC+8上午10:50:14,Roy Binux写道:

Roy Binux

unread,
Jan 28, 2015, 10:10:06 PM1/28/15
to manbuheiniu, pyspide...@googlegroups.com
只运行了一个 `./run.py -c config.ini` 实例吧。
rabbitmq 里面有没有没有排空的队列

manbuheiniu

unread,
Jan 28, 2015, 10:17:08 PM1/28/15
to pyspide...@googlegroups.com, qiaozh...@gmail.com, r...@binux.me
软件里有多个项目,只有这个有这个问题。

只运行这个的简化版(只爬首页和首页链接的详情页)没有问题,运行了一上午没问题。
这个版运行了前天一天了,爬取的数据量已经十五万了。现在这个项目一启动,没过几分钟就卡住所有的项目不动了。看rabbitmq里的队列scheduler2fetcher的数据Ready和Total 都达到了一百就不动了,偶尔是一百零几。


在 2015年1月29日星期四 UTC+8上午10:50:14,Roy Binux写道:
把你部署的启动命令我看看,每个组件运行了几个实例

Roy Binux

unread,
Jan 28, 2015, 10:30:02 PM1/28/15
to manbuheiniu, pyspide...@googlegroups.com
清空队列,然后只运行这个任务,把 **完整** 的日志发给我

manbuheiniu

unread,
Jan 28, 2015, 11:35:48 PM1/28/15
to pyspide...@googlegroups.com, qiaozh...@gmail.com, r...@binux.me
日志文件在附件。这是程序从启动到出错的所有日志。正常运行几分钟就出问题了。下面是项目的代码
#!/usr/bin/env python
# -*- encoding: utf-8 -*-
# vim: set et sw=4 ts=4 sts=4 ff=unix fenc=utf8:
# Created on 2014-12-12 11:26:00

from pyspider.libs.base_handler import *
import re
import json
import time
from pyquery import PyQuery



class Handler(BaseHandler):

   
'''
    this is a sample handler
    '''

   
    crawl_config
= {
       
"headers": {
           
"User-Agent": "BaiDuSpider",
       
}
   
}
   
   
   
def on_start(self):
       
self.crawl('http://blog.chinaunix.net/', callback=self.index_page)
       
   
@every(60)
   
def cronjob(self):
       
self.on_start()
   

   
def index_page(self, response):
               
       
for each in response.doc('A').items():
            searchObj2
= re.search( r'(http://blog.chinaunix.net/uid-(\d*)-id-(\d*).html$)', each.attr.href, re.M|re.I)
           
if searchObj2:
               
self.crawl(each.attr.href, callback=self.detail_page,priority=9,age=60*60*24*2)
            searchObj
= re.search( r'(http://blog.chinaunix.net/uid/(\d*).html$)|(http://blog.chinaunix.net/(.*).html$)', each.attr.href, re.M|re.I)
           
if searchObj:
               
self.crawl(each.attr.href, callback=self.index_page,age=60*60*24*2)
           
           

   
   
def detail_page(self, response):
        text
= response.doc('div.Blog_con2_1').text()
        yd
=re.match( u'.*阅读\((\d+)\)',text)
        hf
=re.match( u'.*评论\((\d+)\)',text)

       
if yd:
            rds
= yd.group(1)
       
else:
            rds
= 0
       
if hf:
            hfs
= hf.group(1)
       
else:
            hfs
= 0
       
       
return {
           
"cid": self.task['taskid'],
           
"url": response.url,
           
"title": response.doc('div.Blog_tit4>a').text(),
           
"posttime": response.doc('div.Blog_tit4>em').text(),
           
#"content": response.doc('div.Blog_wz1').text(),
           
"comment": hfs,
           
"reads": rds,
           
#"sitename": "ChinaUnix博客",
           
#"siteurl": "blog.chinaunix.net",
           
#"ctime":time.time()
       
}




在 2015年1月29日星期四 UTC+8上午11:30:02,Roy Binux写道:
pyspiderlog.txt

Roy Binux

unread,
Jan 28, 2015, 11:59:01 PM1/28/15
to manbuheiniu, pyspide...@googlegroups.com
pyspider 是什么版本的?

manbuheiniu

unread,
Jan 29, 2015, 12:09:47 AM1/29/15
to pyspide...@googlegroups.com, qiaozh...@gmail.com, r...@binux.me
pyspider是三天前我用git从github上clone的最新版。LINUX是centos6.   RabbitMQ 3.4.3, Erlang R14B04

在 2015年1月29日星期四 UTC+8下午12:59:01,Roy Binux写道:

Roy Binux

unread,
Jan 29, 2015, 12:29:19 AM1/29/15
to manbuheiniu, pyspide...@googlegroups.com
现象发生时,有哪些队列是满的吗?

manbuheiniu

unread,
Jan 29, 2015, 12:48:59 AM1/29/15
to pyspide...@googlegroups.com, qiaozh...@gmail.com, r...@binux.me



在 2015年1月29日星期四 UTC+8下午1:29:19,Roy Binux写道:

Roy Binux

unread,
Jan 29, 2015, 1:41:59 AM1/29/15
to manbuheiniu, pyspide...@googlegroups.com
无法复现,看起来是 fetcher 停止读取队列了(不是抓取停止,而是不再读队列了,已经读出来的都正常处理了)。
你可以试试:
1、使用 python 内置队列
2、单独部署,在堵住的时候,ctrl-c 打断 fetcher,看它停在哪了。

manbuheiniu

unread,
Jan 29, 2015, 1:50:56 AM1/29/15
to pyspide...@googlegroups.com, qiaozh...@gmail.com, r...@binux.me
单独部署是什么意思?就算是单机跑程序应该也是多线程的,按ctrl-c也看不出来停哪了吧?单机跑按ctrl-c只显示
^C[I 150129 14:47:57 processor:180] processor exiting...
[I 150129 14:47:57 result_worker:66] result_worker exiting...
[I 150129 14:47:57 app:74] webui exiting...
[I 150129 14:47:57 scheduler:411] scheduler exiting...
这样就退出来。
不知道你说的单独模式是不是启动程序时加one参数。我试试添加one参数运行。

我已经在另一台机器上使用默认的队列和sqlite跑起了这个项目,但是数据量达到十五万估计要等两三天。

在 2015年1月29日星期四 UTC+8下午2:41:59,Roy Binux写道:

Roy Binux

unread,
Jan 29, 2015, 1:52:49 AM1/29/15
to manbuheiniu, pyspide...@googlegroups.com

默认队列 + mysql

manbuheiniu

unread,
Jan 29, 2015, 2:09:18 AM1/29/15
to pyspide...@googlegroups.com, qiaozh...@gmail.com, r...@binux.me
好的。刚试了试原配置文件后边加个one参数运行,没有遇到问题。现在正使用mysql+默认队列运行,有几分钟了还没有遇到错误,估计错误不会出现了。再观察一会

在 2015年1月29日星期四 UTC+8下午2:52:49,Roy Binux写道:

Roy Binux

unread,
Jan 29, 2015, 2:12:03 AM1/29/15
to manbuheiniu, pyspide...@googlegroups.com
one 模式完全不一样的。。。one 模式只是为了调试使用,不是『分别部署』
http://docs.pyspider.org/en/latest/Deployment/  是生产环境推荐的部署方式

manbuheiniu

unread,
Jan 29, 2015, 2:17:20 AM1/29/15
to pyspide...@googlegroups.com, qiaozh...@gmail.com, r...@binux.me
哦哦,one参数是这样用的啊。
我现在没有分别部署,我只把rabbitmq换成了默认队列到现在还没现出问题

在 2015年1月29日星期四 UTC+8下午3:12:03,Roy Binux写道:
...

manbuheiniu

unread,
Jan 29, 2015, 2:48:22 AM1/29/15
to pyspide...@googlegroups.com, qiaozh...@gmail.com, r...@binux.me
使用默认队列很稳定。不知道是我搭建的rabbitmq有问题还是pika接口不稳定。


在 2015年1月29日星期四 UTC+8下午3:12:03,Roy Binux写道:
one 模式完全不一样的。。。one 模式只是为了调试使用,不是『分别部署』
http://docs.pyspider.org/en/latest/Deployment/  是生产环境推荐的部署方式
...

manbuheiniu

unread,
Feb 3, 2015, 1:45:07 AM2/3/15
to pyspide...@googlegroups.com, qiaozh...@gmail.com, r...@binux.me
单机状态下也现出卡机了,只添加任务不处理任务,添加的任务多数是ACTIVE状态,估计是默认队列也被填满了。兄弟有私下的联系试吗?我把服务器的账号给你调试调试


在 2015年1月29日星期四 UTC+8下午3:12:03,Roy Binux写道:
one 模式完全不一样的。。。one 模式只是为了调试使用,不是『分别部署』
http://docs.pyspider.org/en/latest/Deployment/  是生产环境推荐的部署方式
...

Roy Binux

unread,
Feb 3, 2015, 1:46:47 AM2/3/15
to manbuheiniu, pyspide...@googlegroups.com
让你分开部署,这样部署了吗?

manbuheiniu

unread,
Feb 3, 2015, 1:52:37 AM2/3/15
to pyspide...@googlegroups.com, qiaozh...@gmail.com, r...@binux.me
没有分开部署。那我分开部署吧,看看会不会出现问题

在 2015年2月3日星期二 UTC+8下午2:46:47,Roy Binux写道:
...

manbuheiniu

unread,
Feb 3, 2015, 2:17:17 AM2/3/15
to pyspide...@googlegroups.com, qiaozh...@gmail.com, r...@binux.me
请问分别部署是部署四个组件( scheduler,fetcher,result_worker,webui)吗?如果分别部署了还不动怎么进行下一步调试呢?scheduler一直往队列里添加任务,fetcher和其它的组件启动后就提示已经启动,就没有下文了



在 2015年2月3日星期二 UTC+8下午2:46:47,Roy Binux写道:
让你分开部署,这样部署了吗?
...

Roy Binux

unread,
Feb 3, 2015, 2:19:07 AM2/3/15
to manbuheiniu, pyspide...@googlegroups.com
分别部署不能用内置队列,参照文档进行部署:http://docs.pyspider.org/en/latest/Deployment/

manbuheiniu

unread,
Feb 3, 2015, 2:24:03 AM2/3/15
to pyspide...@googlegroups.com, qiaozh...@gmail.com, r...@binux.me
这样啊,那我添加上数据库和队列服务

在 2015年2月3日星期二 UTC+8下午3:19:07,Roy Binux写道:
...

manbuheiniu

unread,
Feb 3, 2015, 7:34:58 PM2/3/15
to pyspide...@googlegroups.com, qiaozh...@gmail.com, r...@binux.me
分别部署后出现运行几个小时后不动的问题。
环境:各组件分别部署,独立搭建rabbitmq服务和mysql服务。
错误日志:
processor组件报错:
[D 150204 06:00:00 project_module:124] project: cnblog updated.
[E 150204 06:00:00 base_connection:299] Socket Error on fd 7: 104
[W 150204 06:00:00 base_connection:160] Socket closed when connection was open
[E 150204 06:00:00 rabbitmq:39] RabbitMQ error: The AMQP connection was closed, reconnect.
[I 150204 06:00:00 base_connection:179] Connecting to 10.129.82.172:5672
[I 150204 06:00:00 processor:153] process cnblog:_on_cronjob data:,_on_cronjob -> [200] len:11 -> result:None fol:1 msg:0 err:None
[E 150204 07:00:00 base_connection:299] Socket Error on fd 7: 104
[W 150204 07:00:00 base_connection:160] Socket closed when connection was open
[E 150204 07:00:00 rabbitmq:39] RabbitMQ error: The AMQP connection was closed, reconnect.
[I 150204 07:00:00 base_connection:179] Connecting to 10.129.82.172:5672
[I 150204 07:00:00 processor:153] process cnblog:_on_cronjob data:,_on_cronjob -> [200] len:11 -> result:None fol:1 msg:0 err:None
[D 150204 08:00:00 project_module:124] project: cnblog updated.
[E 150204 08:00:00 base_connection:299] Socket Error on fd 7: 104
[W 150204 08:00:00 base_connection:160] Socket closed when connection was open
[E 150204 08:00:00 rabbitmq:39] RabbitMQ error: The AMQP connection was closed, reconnect.
[I 150204 08:00:00 base_connection:179] Connecting to 10.129.82.172:5672
[I 150204 08:00:00 processor:153] process cnblog:_on_cronjob data:,_on_cronjob -> [200] len:11 -> result:None fol:1 msg:0 err:None
[E 150204 08:22:05 base_connection:299] Socket Error on fd 6: 104
[W 150204 08:22:05 base_connection:160] Socket closed when connection was open
[E 150204 08:22:05 rabbitmq:39] RabbitMQ error: The AMQP connection was closed, reconnect.
[I 150204 08:22:05 base_connection:179] Connecting to 10.129.82.172:5672
[I 150204 08:22:05 processor:153] process cnblog:on_start data:,on_start -> [200] len:8 -> result:None fol:1 msg:0 err:None


scheduler组件报错:
[I 150204 08:29:43 task_queue:151] [processing: retry] 46295bb3c582484caae1f03736114fac
[I 150204 08:29:44 task_queue:151] [processing: retry] d9ad73b4e68653f0f172ac81e536b99b
[I 150204 08:29:45 task_queue:151] [processing: retry] 2d4ba4af7e5f25afce0314b526f8ffc9
[I 150204 08:29:47 task_queue:151] [processing: retry] f5cc10591d19c04df9aee8658ce2c852
[I 150204 08:29:48 task_queue:151] [processing: retry] 840aef41f8e2ed033c49eda1a70d20b8
[I 150204 08:29:49 task_queue:151] [processing: retry] 4e422573552d37ef898c2765f2335394
[I 150204 08:29:49 task_queue:151] [processing: retry] 4987016b312bbc8945b0b20614889976
[I 150204 08:29:50 task_queue:151] [processing: retry] 9d063720f81a0232a8695c6bc9b2e3e3
[I 150204 08:29:53 task_queue:151] [processing: retry] a9568138dc694a8f5761864e075eedcb
[I 150204 08:29:54 task_queue:151] [processing: retry] 6570e021436da9fdf6dbc2a49a1719e5
[I 150204 08:29:55 task_queue:151] [processing: retry] 96de45b4cff0c2f162f005f38d19b667
[I 150204 08:29:56 task_queue:151] [processing: retry] 9e3edb3e75263ca4fbe91877a3edb5bc


其它组件日志正常等待。
rabbitmq服务状态:
各队列数值都为0,队列里没有数据进入和输出。





在 2015年2月3日星期二 UTC+8下午3:19:07,Roy Binux写道:
分别部署不能用内置队列,参照文档进行部署:http://docs.pyspider.org/en/latest/Deployment/
...

Roy Binux

unread,
Feb 3, 2015, 8:41:07 PM2/3/15
to manbuheiniu, pyspide...@googlegroups.com
scheduler 日志再往前,时间和 processor 对不上

manbuheiniu

unread,
Feb 3, 2015, 8:55:00 PM2/3/15
to pyspide...@googlegroups.com, qiaozh...@gmail.com, r...@binux.me
没有保存日志。我刚把scheduler和processor服务重启了,现在正常了。scheduler出现这个错误之前应该是一直在select进入队列,之后队列满后过一段时间就是processing: retry。我再观察观察吧

在 2015年2月4日星期三 UTC+8上午9:41:07,Roy Binux写道:
...

manbuheiniu

unread,
Feb 5, 2015, 8:33:02 PM2/5/15
to pyspide...@googlegroups.com, qiaozh...@gmail.com, r...@binux.me
项目运行一段时间还是会卡住,我把项目添加到了demo服务器上,一小时左右就卡住了,有很多ACTIVE状态的任务过去几十分钟了还是没更新状态。请查看http://demo.pyspider.org/tasks?project=ACTIVE


在 2015年2月4日星期三 UTC+8上午9:41:07,Roy Binux写道:
scheduler 日志再往前,时间和 processor 对不上
...

Roy Binux

unread,
Feb 5, 2015, 8:37:41 PM2/5/15
to manbuheiniu, pyspide...@googlegroups.com
asdf 是你添加的吗?demo 卡住是因为这个脚本为空,导致 processor 退出。

Regards,
Roy Binux

--
You received this message because you are subscribed to the Google Groups "pyspider-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pyspider-user...@googlegroups.com.

manbuheiniu

unread,
Feb 5, 2015, 8:38:15 PM2/5/15
to pyspide...@googlegroups.com, qiaozh...@gmail.com, r...@binux.me


在 2015年2月4日星期三 UTC+8上午9:41:07,Roy Binux写道:
scheduler 日志再往前,时间和 processor 对不上
...

Roy Binux

unread,
Feb 5, 2015, 8:41:58 PM2/5/15
to manbuheiniu, pyspide...@googlegroups.com
因为它还在队列中啊,ACTIVE 不是说正在抓取,而是指在队列中。
tasks 列表中的活动日志,因为任务有启动日志,没有正常完成,没有完成日志。所以是在活动状态。

manbuheiniu

unread,
Feb 5, 2015, 9:58:24 PM2/5/15
to pyspide...@googlegroups.com, qiaozh...@gmail.com, r...@binux.me
active是没有正常完成所以一直是这个状态吗?任务也没有报错怎么知道是哪的原因没有正常完成啊?还有就是没有完成的日志会一直是active状态,数量一多整个任务就不往下进行了,这个问题应该怎么解决呢?

在 2015年2月6日星期五 UTC+8上午9:41:58,Roy Binux写道:
...

Roy Binux

unread,
Feb 5, 2015, 10:03:01 PM2/5/15
to manbuheiniu, pyspide...@googlegroups.com
scheduler 发出的任务,如果 10 分钟没有被处理完成,会重新进入优先队列。在 tasks 面板上看到的就是一直处于 ACTIVE 状态。
『数量一多整个任务就不往下进行了』并不存在这个问题,至少这只是现象,这个现象原因不一样。
你在 demo 上看到的柱塞是因为 asdf 脚本异常,导致 processor 异常过多自动退出导致的。

--
You received this message because you are subscribed to the Google Groups "pyspider-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pyspider-user...@googlegroups.com.
To post to this group, send email to pyspide...@googlegroups.com.

manbuheiniu

unread,
Feb 5, 2015, 10:33:37 PM2/5/15
to pyspide...@googlegroups.com, qiaozh...@gmail.com, r...@binux.me
不是我添加的。我的服务器上运行ACTIVE这个项目就是过段时间就卡住,队列里全都是active状态的任务。重启一下pyspider才能恢复正常。

在 2015年2月6日星期五 UTC+8上午9:37:41,Roy Binux写道:
...

Roy Binux

unread,
Feb 5, 2015, 10:35:23 PM2/5/15
to manbuheiniu, pyspide...@googlegroups.com
挨个重启,告诉我重启哪个的时候好了。
Reply all
Reply to author
Forward
0 new messages