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.