Switched my RoR (3.1.3, 1.9.2) app from Thin to Unicorn (4.6.2). It ran
fine in development
(Mac OSX), but when deploying to production on Heroku, it fails silently
(no backtrace, no error detail). Log looks like:

Starting process with command `bundle exec unicorn start -p 6069 -c
./config/unicorn.rb`
   /app/vendor/bundle/ruby/1.9.1/gems/unicorn-4.6.2/lib/unicorn/configurator.rb:634:in
`parse_rackup_file': rackup file (start) not readable (ArgumentError)
   from
/app/vendor/bundle/ruby/1.9.1/gems/unicorn-4.6.2/lib/unicorn/configurator.rb:77:in
`reload'
   from
/app/vendor/bundle/ruby/1.9.1/gems/unicorn-4.6.2/lib/unicorn/configurator.rb:68:in
`initialize'
   from
/app/vendor/bundle/ruby/1.9.1/gems/unicorn-4.6.2/lib/unicorn/http_server.rb:108:in
`new'
   from
/app/vendor/bundle/ruby/1.9.1/gems/unicorn-4.6.2/lib/unicorn/http_server.rb:108:in
`initialize'
   from
/app/vendor/bundle/ruby/1.9.1/gems/unicorn-4.6.2/bin/unicorn:126:in
`new'
   from
/app/vendor/bundle/ruby/1.9.1/gems/unicorn-4.6.2/bin/unicorn:126:in
`<top (required)>'
   from /app/vendor/bundle/ruby/1.9.1/bin/unicorn:19:in `load'
   from /app/vendor/bundle/ruby/1.9.1/bin/unicorn:19:in `<main>'
Process exited with status 1
State changed from starting to crashed

Procfile:
     web: bundle exec unicorn start -p $PORT -c ./config/unicorn.rb
     sidekiq: bundle exec sidekiq -c 10

unicorn.rb:
     worker_processes Integer(ENV["WEB_CONCURRENCY"] || 3)
     timeout 15
     preload_app true

     before_fork do |server, worker|

       Signal.trap 'TERM' do
         puts 'Unicorn master intercepting TERM and sending myself QUIT
instead'
         Process.kill 'QUIT', Process.pid
       end

       defined?(ActiveRecord::Base) and
         ActiveRecord::Base.connection.disconnect!
     end

     after_fork do |server, worker|

       Signal.trap 'TERM' do
         puts 'Unicorn worker intercepting TERM and doing nothing. Wait
for master to sent QUIT'
       end

       defined?(ActiveRecord::Base) and
         ActiveRecord::Base.establish_connection
     end

I have no idea where to even begin to troubleshoot this problem. Any
thoughts?

--
Posted via http://www.ruby-forum.com/.

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/454498957c41de17f2c2e453915c8400%40ruby-forum.com?hl=en-US.
For more options, visit https://groups.google.com/groups/opt_out.

Search Discussions

  • Jack R. at May 25, 2013 at 6:19 pm
    Problem turned out to be in my Procfile. Changed "bundle exec unicorn
    start" to "bundle exec unicorn" and problem went away. Not sure where I
    found the "start" syntax. Oh well.

    --
    Posted via http://www.ruby-forum.com/.

    --
    You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
    To post to this group, send email to rubyonrails-talk@googlegroups.com.
    To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/f9742c16a8e9b87b1e491829fed1e4ca%40ruby-forum.com?hl=en-US.
    For more options, visit https://groups.google.com/groups/opt_out.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouprubyonrails-talk @
categoriesrubyonrails
postedMay 25, '13 at 6:23a
activeMay 25, '13 at 6:19p
posts2
users1
websiterubyonrails.org
irc#RubyOnRails

1 user in discussion

Jack R.: 2 posts

People

Translate

site design / logo © 2022 Grokbase