Ubuntu lighttpd 1.5 spawn-fcgi 进程死亡

环境如下:
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,过了不到一分钟,这些进程全部消亡了。
百搜不见其解!

你可能感兴趣的:(socket,ubuntu,lighttpd,Ruby,Rails)