ruby on rails - ERROR -- : reaped #<Process::Status: pid 4335 exit 1> worker=0 -
i trying since 2 days deploy on vps (ubuntu 12.04 server (64 bits)) using : ruby (1.9.3-rc1), rails, capistrano, nginx , unicorn.
i follow railscast tutorial ryan bates showing how deploy on vps scratch.
actualy cap deploy:cold command seems work fine (as others) when try go on url fall on "we're sorry went wront" => default error page rails.
in production logs :
migrating createquestionanswers (20130317152603) migrating createregions (20130502212531) migrating addregionidtosection (20130502212557) migrating createannonceimages (20130510130906) migrating addattachmentimagetoannonceimages (20130510130925) migrating createformations (20130510195503) migrating createinscriptions (20130510195627) migrating addattachmentimagetoformations (20130511182928) migrating addparamstoinscription (20130514231201) migrating addpaypalidtoinscription (20130514234243) (0.3ms) select "schema_migrations"."version" "schema_migrations" connecting database specified database.yml connecting database specified database.yml creating scope :all. overwriting existing method user.all. creating scope :all. overwriting existing method user.all. creating scope :all. overwriting existing method echange.all. creating scope :all. overwriting existing method echange.all. creating scope :validate. overwriting existing method annonce.validate. creating scope :validate. overwriting existing method annonce.validate. creating scope :all. overwriting existing method article.all. creating scope :all. overwriting existing method article.all.
so looked @ unicorn logs , found :
e, [2013-05-21t03:20:08.751341 #31081] error -- : reaped #<process::status: pid 4335 exit 1> worker=0 i, [2013-05-21t03:20:08.753997 #31081] info -- : worker=0 spawning... e, [2013-05-21t03:20:08.790666 #31081] error -- : reaped #<process::status: pid 4332 exit 1> worker=1 i, [2013-05-21t03:20:08.791251 #31081] info -- : worker=1 spawning... i, [2013-05-21t03:20:08.794600 #4341] info -- : worker=0 spawned pid=4341 i, [2013-05-21t03:20:08.796302 #4341] info -- : refreshing gem list i, [2013-05-21t03:20:08.802089 #4344] info -- : worker=1 spawned pid=4344 i, [2013-05-21t03:20:08.803227 #4344] info -- : refreshing gem list i, [2013-05-21t03:20:37.871677 #31081] info -- : reloading config_file=/home/deployer/apps/avocat-immo/current/config/unicorn.rb i, [2013-05-21t03:20:37.876045 #31081] info -- : done reloading config_file=/home/deployer/apps/avocat-immo/current/config/unicorn.rb i, [2013-05-21t03:20:38.002451 #31081] info -- : reaped #<process::status: pid 4344 exit 0> worker=1 i, [2013-05-21t03:20:38.002640 #31081] info -- : worker=1 spawning... i, [2013-05-21t03:20:38.007280 #4674] info -- : worker=1 spawned pid=4674 i, [2013-05-21t03:20:38.007595 #4674] info -- : refreshing gem list i, [2013-05-21t03:20:38.010511 #31081] info -- : reaped #<process::status: pid 4341 exit 0> worker=0 i, [2013-05-21t03:20:38.010714 #31081] info -- : worker=0 spawning... i, [2013-05-21t03:20:38.012600 #4678] info -- : worker=0 spawned pid=4678 i, [2013-05-21t03:20:38.012886 #4678] info -- : refreshing gem list i, [2013-05-21t03:21:08.079364 #4678] info -- : worker=0 ready i, [2013-05-21t03:21:08.080779 #4674] info -- : worker=1 ready i, [2013-05-21t03:21:46.897404 #31081] info -- : reloading config_file=/home/deployer/apps/avocat-immo/current/config/unicorn.rb i, [2013-05-21t03:21:46.900599 #31081] info -- : done reloading config_file=/home/deployer/apps/avocat-immo/current/config/unicorn.rb i, [2013-05-21t03:21:47.237973 #31081] info -- : reaped #<process::status: pid 4678 exit 0> worker=0 i, [2013-05-21t03:21:47.238160 #31081] info -- : worker=0 spawning... i, [2013-05-21t03:21:47.241018 #31081] info -- : reaped #<process::status: pid 4674 exit 0> worker=1 i, [2013-05-21t03:21:47.241296 #31081] info -- : worker=1 spawning... i, [2013-05-21t03:21:47.243055 #4919] info -- : worker=0 spawned pid=4919 i, [2013-05-21t03:21:47.243287 #4919] info -- : refreshing gem list i, [2013-05-21t03:21:47.245830 #4921] info -- : worker=1 spawned pid=4921 i, [2013-05-21t03:21:47.246122 #4921] info -- : refreshing gem list i, [2013-05-21t03:22:17.055549 #4919] info -- : worker=0 ready i, [2013-05-21t03:22:17.057331 #4921] info -- : worker=1 ready i, [2013-05-21t03:29:57.149534 #31081] info -- : reloading config_file=/home/deployer/apps/avocat-immo/current/config/unicorn.rb i, [2013-05-21t03:29:57.181644 #31081] info -- : done reloading config_file=/home/deployer/apps/avocat-immo/current/config/unicorn.rb i, [2013-05-21t03:29:57.997267 #31081] info -- : reaped #<process::status: pid 4919 exit 0> worker=0 i, [2013-05-21t03:29:57.997689 #31081] info -- : worker=0 spawning... i, [2013-05-21t03:29:58.003458 #31081] info -- : reaped #<process::status: pid 4921 exit 0> worker=1 i, [2013-05-21t03:29:58.003691 #31081] info -- : worker=1 spawning... i, [2013-05-21t03:29:58.010269 #7783] info -- : worker=0 spawned pid=7783
over , on ...
so here configs :
my unicorn.rb :
root = "/home/deployer/apps/avocat-immo/current" working_directory root pid "#{root}/tmp/pids/unicorn.pid" stderr_path "#{root}/log/unicorn.log" stdout_path "#{root}/log/unicorn.log" listen "/tmp/unicorn.avocat.sock" worker_processes 2 timeout 30
and here unicorn_init.sh
#!/bin/sh set -e # feel free change of following variables app: timeout=${timeout-60} app_root=/home/deployer/apps/avocat-immo/current pid=$app_root/tmp/pids/unicorn.pid cmd="cd $app_root; bundle exec unicorn -d -c $app_root/config/unicorn.rb -e production" as_user=deployer set -u old_pin="$pid.oldbin" sig () { test -s "$pid" && kill -$1 `cat $pid` } oldsig () { test -s $old_pin && kill -$1 `cat $old_pin` } run () { if [ "$(id -un)" = "$as_user" ]; eval $1 else su -c "$1" - $as_user fi } case "$1" in start) sig 0 && echo >&2 "already running" && exit 0 run "$cmd" ;; stop) sig quit && exit 0 echo >&2 "not running" ;; force-stop) sig term && exit 0 echo >&2 "not running" ;; restart|reload) sig hup && echo reloaded ok && exit 0 echo >&2 "couldn't reload, starting '$cmd' instead" run "$cmd" ;; upgrade) if sig usr2 && sleep 2 && sig 0 && oldsig quit n=$timeout while test -s $old_pin && test $n -ge 0 printf '.' && sleep 1 && n=$(( $n - 1 )) done echo if test $n -lt 0 && test -s $old_pin echo >&2 "$old_pin still exists after $timeout seconds" exit 1 fi exit 0 fi echo >&2 "couldn't upgrade, starting '$cmd' instead" run "$cmd" ;; reopen-logs) sig usr1 ;; *) echo >&2 "usage: $0 <start|stop|restart|upgrade|force-stop|reopen-logs>" exit 1 ;; esac
i have tried
/etc/init.d/unicorn_avocat-immo start /etc/init.d/unicorn_avocat-immo stop
i restarted nginx nothing seems work. website load in less sec on error page , website not yet working should in production.
can me on matter ?
additional informations found in nginx errors.log
2013/05/21 12:23:08 [crit] 19097#0: *16 connect() unix:/tmp/avocat.sock failed (2: no such file or directory) while connecting upstream, client: **.***.**.***, server: , request: "get / http/1.1", upstream: "http://unix:/tmp/avocat.sock:/", host: "**.***.**.***"
just add config.log_level = :debug
in config/production.rb
you error log in log/production.log paste output of log can
also try rake assets:precompile
Comments
Post a Comment