unicorn

Missing Content-Length header when using Nginx + Gzip + Unicorn

喜欢而已 提交于 2019-12-10 21:42:49
问题 I don't know why http response is missed "Content-Length header" when I use gzip in nginx, i'm really getting stuck,please somebody help me, thank you so much! this is my config file, nginx.conf user nobody nobody ; worker_processes 8; events { worker_connections 1024; accept_mutex on; # "on" if nginx worker_processes > 1 use epoll; # enable for Linux 2.6+ } http { include mime.types; default_type application/octet-stream; log_format main '$remote_addr - $remote_user [$time_local] "$request"

Unicorn and omniauth-facebook - uninitialized constant OmniAuth

佐手、 提交于 2019-12-10 17:41:34
问题 So I am trying to get omniauth-facebook to work in my production env. It works fine locally on my machine using POW. My prod env is ubuntu with nginx/unicorn and code is Rails 3.2.13, the errors from unicorn are: E, [2013-05-20T15:51:13.900829 #8737] ERROR -- : uninitialized constant OmniAuth (NameError) /home/web/apps/****/releases/20130520041958/config/initializers/omniauth.rb:1:in `<top (required)>' So from what I could find I try adding require 'omniauth/facebook' above the configure

Why can't nginx find my assets?

廉价感情. 提交于 2019-12-10 16:06:53
问题 I'm on rails 3.2 and my production setup is using nginx and unicorn. I have a problem with some assets that a ruby gem called sidekiq uses. However those assets are not being served properly when I request them. My nginx config looks like this: upstream unicorn { server unix:/tmp/unicorn.myapp.sock fail_timeout=0; } server { listen 80 default deferred; # server_name example.com; root /home/deployer/apps/myapp/current/public; if (-f $document_root/system/maintenance.html) { return 503;my }

Ruby, Unicorn, and environment variables

青春壹個敷衍的年華 提交于 2019-12-10 12:37:28
问题 While playing with Heroku, I found their approach of using environment variables for server-local configuration brilliant. Now, while setting up an application server of my own, I find myself wondering how hard that would be to replicate. I'm deploying a sinatra application, riding Unicorn and Nginx. I know nginx doesn't like to play with the environment, so that one's out. I can probably put the vars somewhere in the unicorn config file, but since that's under version control with the rest

Setting up thinking sphinx after server reboot (Rails project)

为君一笑 提交于 2019-12-10 12:16:33
问题 Problem: I am trying to get sphinx running again after server reboot. There seems to be no sphinx.conf file when I try to start it running: >searchd Sphinx 2.0.4-release (r3135) Copyright (c) 2001-2012, Andrew Aksyonoff Copyright (c) 2008-2012, Sphinx Technologies Inc (http://sphinxsearch.com) FATAL: no readable config file (looked in /etc/sphinxsearch/sphinx.conf, ./sphinx.conf). I have run: rake thinking_sphinx:configure rake thinking_sphinx:index rake thinking_sphinx:start The problem is

Unicorn Rails - Takes 100% CPU while starting in production mode

旧街凉风 提交于 2019-12-10 04:17:24
问题 We are using Unicorn_Rails + nginx. It works well in development mode and production mode in my system ( 4GB Ram , Intel(R) Core(TM)2 Duo CPU P8600 @ 2.40GHz) i am able to start 10 workers in local system but unable to start more than 2 in any case in production sometimes it works but need to wait for 15- 20 mts It takes 99.6% CPU all the time while starting unicorn_rails Intel(R) Xeon(R) CPU E5507 @ 2.27GHz but it hangs in amazon ( m1.small instance ) 1.73 GB RAM i find no one talking about

Rails, Heroku, Unicorn & Resque - how to choose the amount of web workers / resque workers?

*爱你&永不变心* 提交于 2019-12-08 14:50:27
I've just switched to using Unicorn on Heroku. I'm also going to switch to resque from delayed_job and use the setup described at http://bugsplat.info/2011-11-27-concurrency-on-heroku-cedar.html What I don't understand from this is how config/unicorn.rb: worker_processes 3 timeout 30 @resque_pid = nil before_fork do |server, worker| @resque_pid ||= spawn("bundle exec rake " + \ "resque:work QUEUES=scrape,geocode,distance,mailer") end translates into: "This will actually result in six processes in each web dyno: 1 unicorn master, 3 unicorn web workers, 1 resque worker, 1 resque child worker

Nginx unknown directive “upstream” error when deploying Rails

ε祈祈猫儿з 提交于 2019-12-08 09:46:18
问题 I am trying to install an standard Rails app. After going through a tutorial https://coderwall.com/p/yz8cha I am stuck at last step. When trying to restart nginx I get the following error - Restarting nginx: nginx: [emerg] unknown directive "upstream" in /etc/nginx/nginx.conf:1 ; nginx: configuration file /etc/nginx/nginx.conf test failed I have strictly followed all the steps in https://coderwall.com/p/yz8cha so my conf files and unicorn.rb files are pretty much same with changes in

ERROR — : reaped #<Process::Status: pid 4335 exit 1> worker=0

血红的双手。 提交于 2019-12-08 04:50:19
问题 I am trying since 2 days to deploy on my vps (Ubuntu 12.04 Server (64 bits)) using : ruby (1.9.3-rc1), rails, capistrano, nginx and unicorn. I also follow railscast tutorial from Ryan Bates showing how to deploy on VPS from scratch. Actualy the cap deploy:cold command seems to work fine (as all the others) but when i try to go on my url i fall on "We're sorry but something went wront" => The default error page from Rails. In my production logs i get : Migrating to CreateQuestionAnswers

rails 500 error no production log entry

不问归期 提交于 2019-12-08 04:19:12
问题 I have installed a new rails application on the same server as another application. The original is running fine but the new application gives me the infamous "We're sorry but something went wrong" but there is no entry in production log. The last entries in production log are from my migration using rake. I have found if I run cap deploy:cold it will work but then on the next yupdate will fail again with no sock file. Then cap deploy:cold seems to be required on each update. edit: If I run