Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Where is my stack trace?

I have a small Rails 3.2 app that I am trying to get running under unicorn proxied to an Apache vhost on a Linode server. In development mode locally, and on the linode, it works as expected. But as soon as I throw the -E production switch, I get the error in the browser that "We're sorry, but something went wrong."

So, of course I try to look in the logs to see what the issue is. But there is NOTHING in the app log dir. Nor is there any useful info in /var/log/apache2.

So, I tried to reduce the situation to its essentials, and just running and accessing unicorn_rails directly gives the same exact problem. The only output should be to stdout/stderr, and nothing is shown there either.

$ bundle exec unicorn -E production -p 9092   
I, [2012-03-10T15:02:50.208750 #2891]  INFO -- : listening on addr=0.0.0.0:9092 fd=7
I, [2012-03-10T15:02:50.211113 #2891]  INFO -- : worker=0 spawning...
I, [2012-03-10T15:02:50.224912 #2891]  INFO -- : master process ready
I, [2012-03-10T15:02:50.225570 #2908]  INFO -- : worker=0 spawned pid=2908
I, [2012-03-10T15:02:50.225900 #2908]  INFO -- : Refreshing Gem list
I, [2012-03-10T15:03:00.725142 #2908]  INFO -- : worker=0 ready
cache: [GET /] miss
cache: [GET /favicon.ico] miss

As I said, if I change to development mode then it works normally. It also doesn't matter whether I run the above as root or as a normal user.

I am using RVM so that could be an issue, but unicorn does run in development - and all the required gems are installed.

With the -d debug flag for unicorn, I get lots of warnings and exceptions related to certain gems, in either production or development mode. I'm not seeing anything interesting in the debug output, but can post that if it helps.

share|improve this question
    
I ran the site in production under webrick, and it wrote to logs/production.log (the error had to do with sprockets pre-compiling assets, no suprise). But the question remains, because running under unicorn in production I am still getting no exceptions in the logs. –  sbeam Mar 10 '12 at 16:07

1 Answer 1

up vote 1 down vote accepted

found it - BUG IN RAILS :P

https://github.com/rails/rails/issues/4277

fixed by updating to 3.2.2

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.