下面是supervisor的配置
[program:pyspider]
command=/usr/local/bin/pyspider -c /root/config.json
autostart=true
autorestart=true
user=root
directory=/root
不使用supervisor来启动pyspider,phantomjs进程为2个.
使用supervisor后,phantomjs进程超过6个以上,并且在代码界面进行测试也会卡死,只能kill掉pyspider和phantomjs才行.
环境是Ubuntu14.04X64
python2.7.6
phantomjs1.9.0
vps内存768M