Marian Theisen
Marian Theisen

Reputation: 6354

unicorn dies and won't tell me why

I've moved a rails app from a linux box to a mac os x lion server. app was running perfectly fine on the linux box, haven't changed the stack (nginx + unicorn on both machines). but i can't get unicorn to work again. it just dies after starting without leaving much trace, only (in unicorn.sterr.log):

I, [2012-02-10T16:45:04.770376 #21138]  INFO -- : master process ready
E, [2012-02-10T16:45:05.142841 #21138] ERROR -- : reaped #<Process::Status: pid=21813,exited(1)> worker=0

(i have and need only 1 worker process, it's a small utility app) it seems that the worker process exits abnormally (exit status 1), but there is no output in production.log or unicorn.stdout.log. i can start the rails server in production mode with mongrel or webrick, runs fine, accepts connections etc. no problems.

any ideas or debugging tips?

i'm using:

* Mac OS X Lion Server 10.7.3
* Nginx 1.0.11
* REE 2012.01
* Rails 3.0.x
* Unicorn 4.1.1
* PostgreSQL 9.1
* Homebrew
* RVM (system wide)

Upvotes: 2

Views: 1665

Answers (2)

Matt Connolly
Matt Connolly

Reputation: 9847

Unicorn configs often redirect stdout and stderr. Look in log/unicorn.rb for the exception details.

Upvotes: 0

sylvainsf
sylvainsf

Reputation: 21

Start unicorn without -D (daemon mode) and your terminal will stay attached to the console. This should provide more output as to the reason for the crash.

Upvotes: 1

Related Questions