浏览 3897 次
精华帖 (0) :: 良好帖 (0) :: 新手帖 (0) :: 隐藏帖 (0)
|
|
---|---|
作者 | 正文 |
发表时间:2008-08-03
ubuntu server v8 lighttpd-1.5.0-r1992 ruby 1.8.6 (2007-09-24 patchlevel 111) fcgi-2.4.0 ruby-fcgi-0.8.7.tar apt-get了libfcgi0,libfcgi-dev 单独启动spawn-fcgi的脚本lighttpd DISPATCH_PATH=/home/www/www.jk.com/public/dispatch.fcgi SOCKET_PATH=/tmp/ RAILS_ENV=production export $RAILS_ENV case "$1" in start) rm -rf $SOCKET_PATH/javaeye.socket-* for num in 0 1 2 3 4 5 6 7 8 9 do /etc/lighttpd/bin/spawn-fcgi -f $DISPATCH_PATH -s $SOCKET_PATH/rails-fastcgi.socket-$num -u lighttpd -g lighttpd done ;; stop) killall ruby # killall -9 dispatch.fcgi rm -rf $SOCKET_PATH/rails-fastcgi.socket-* ;; restart) $0 stop $0 start ;; *) echo "Usage: dispatch.sh {start|stop|restart}" ;; esac exit 0 显示启动成功: root@weteam:/home/script# ./lighttpd start spawn-fcgi.c.206: child spawned successfully: PID: 4670 spawn-fcgi.c.206: child spawned successfully: PID: 4672 spawn-fcgi.c.206: child spawned successfully: PID: 4674 spawn-fcgi.c.206: child spawned successfully: PID: 4676 spawn-fcgi.c.206: child spawned successfully: PID: 4678 spawn-fcgi.c.206: child spawned successfully: PID: 4680 spawn-fcgi.c.206: child spawned successfully: PID: 4682 spawn-fcgi.c.206: child spawned successfully: PID: 4684 spawn-fcgi.c.206: child spawned successfully: PID: 4686 spawn-fcgi.c.206: child spawned successfully: PID: 4688 root@weteam:/home/script#ps aux root 4670 11.1 1.8 21208 19536 ? Rs 22:12 0:02 /usr/bin/ruby1.8 /home/www/www.jk.com/public/dispatch.fcgi root 4672 10.6 1.8 21212 19544 ? Rs 22:12 0:02 /usr/bin/ruby1.8 /home/www/www.jk.com/public/dispatch.fcgi root 4674 10.3 1.8 21208 19536 ? Rs 22:12 0:02 /usr/bin/ruby1.8 /home/www/www.jk.com/public/dispatch.fcgi root 4676 10.2 1.8 21208 19536 ? Rs 22:12 0:02 /usr/bin/ruby1.8 /home/www/www.jk.com/public/dispatch.fcgi root 4678 10.0 1.8 21208 19540 ? Rs 22:12 0:02 /usr/bin/ruby1.8 /home/www/www.jk.com/public/dispatch.fcgi root 4680 9.9 1.8 21208 19536 ? Rs 22:12 0:02 /usr/bin/ruby1.8 /home/www/www.jk.com/public/dispatch.fcgi root 4682 10.2 1.8 21204 19536 ? Rs 22:12 0:02 /usr/bin/ruby1.8 /home/www/www.jk.com/public/dispatch.fcgi root 4684 10.1 1.8 21204 19540 ? Rs 22:12 0:02 /usr/bin/ruby1.8 /home/www/www.jk.com/public/dispatch.fcgi root 4686 10.0 1.8 21212 19540 ? Rs 22:12 0:02 /usr/bin/ruby1.8 /home/www/www.jk.com/public/dispatch.fcgi root 4688 10.0 1.8 21212 19540 ? Rs 22:12 0:02 /usr/bin/ruby1.8 /home/www/www.jk.com/public/dispatch.fcgi 这时候没有启动lighttpd,过了不到一分钟,这些进程全部消亡了。 百搜不见其解! 声明:ITeye文章版权属于作者,受法律保护。没有作者书面许可不得转载。
推荐链接
|
|
返回顶楼 | |
发表时间:2008-08-04
查 log 吧,一半这种情况是 fcgi 收到一个结束信号或者错误信号,在log里会有记录。
另外,以前我也尝试过 lighttpd + fastcgi ,不是很稳定,其他人也有这样的反映,现在的版本就不是很清楚了 |
|
返回顶楼 | |
发表时间:2008-08-04
我用下来挺正常,不过还是建议你先用1.4.19。
|
|
返回顶楼 | |
发表时间:2008-08-04
问题已经解决:
apt-get install libopenssl-ruby1.8 这是在试着用lighttpd-1.4.19的时候出现的log,1.5下单独启动spawn-fcgi是没有任何log输出的。 要注意的是,lighttpd启动的用户和的spawn-fcgi用户要一致,才能调用其socket。 |
|
返回顶楼 | |