Slow initial server startup when using Phusion Passenger and Rails

What’s happening is that your Application and/or ApplicationSpawners are shutting down due to time-out. To process your new request, Passenger has to startup a new copy of your application, which can take several seconds, even on a fast machine. To fix the issue, there are a few Apache configuration options you can use to keep … Read more

Nginx configuration leads to endless redirect loop

It’s your line here: listen 443 default ssl; change it to: listen 443; ssl on; This I’ll call the old style. Also, that along with proxy_set_header X_FORWARDED_PROTO https; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header Host $http_host; proxy_set_header X-Url-Scheme $scheme; proxy_redirect off; proxy_max_temp_file_size 0; did the trick for me. I see now i am missing the real IP … Read more

“Incomplete response received from application” from nginx / passenger

Your rails_env production don’t have required set up,probably missing secret_key_base. Open /etc/nginx/sites-available/default and change the rails_env to development: rails_env production; to rails_env development; If the app is loading it’s not a passenger issue. Production Solution: Enter your app root run: rake secret copy the output go to /yourapp/config/secrets.yml set the production secret_key_base Restart the passenger … Read more