0
votes
0answers
34 views

Restart individual rails apps in nginx+unicorn

I have 15-20 independent rails applications on the same ec2 instance. The rails applications are deployed using apache + passenger with Railsbaseuri. RailsBaseURI /games <Directory ...
0
votes
1answer
86 views

Instances slow when connected to AWS load balancer

I have setup 5 t1.micro EC2's behind an AWS load balancer. All the instances slow down once they are connected to the LB. Eight out of 10 requests takes more than 30s even when I do the requests ...
3
votes
0answers
60 views

Rails 4 Unicorn+Nginx on Ubuntu 13.04 VPS keeps crashing

I bought a years subscription at bluevm.com (found some coupon code, it was only about $15 for a whole year) to launch my first Rails Production server. I'm running Nginx with Unicorn and MySQL on ...
1
vote
0answers
23 views

Redhat quitting process never works always have to kill it

I am working on a RedHat server creating a unicorn process. I have two sets of these processes being created. I am able to QUIT one of the process fine and do so over and over again create it and QUIT ...
1
vote
0answers
104 views

Rails when served by unicorn is generating the wrong fingerprint for precompiled assets

I have a production server with nginx -> unicorn -> rails. I precompile assets, which puts assets in public/assets with a fingerprint (hash) appended to the filename. However, when a web page is ...
-1
votes
2answers
25 views

Nginx: Changing user [closed]

I have root and deployer users in my ubuntu 13.10. I also have nginx, unicorn installed with Rails 4 application. I'm deploying my application using capistrano 3. Problem: When I prepare a env for ...
1
vote
0answers
99 views

Nginx Returning 504 Error

I'm getting a 504 error from Nginx on my Ubuntu server where I'm running Rails using Unicorn. When I look in the Nginx error.log.1, I see: 2014/01/21 18:06:02 [error] 698#0: *2 connect() failed ...
1
vote
2answers
203 views

Explain load-balancing with Nginx like I'm five

I've found plenty of DIY posts and tutorials on how to configure Nginx as a load-balancer using upstream server: upstream backend { ip_hash; server 1.2.3.4; server 1.2.3.5; server 1.2.3.6; } ...
1
vote
0answers
142 views

nginx configuration for rails subdir deployment

I'm having quite a bit of trouble configuring nginx to serve my Rails app's static files; I mean all the files in the app's public/ folder, not just the files in Rails' asset pipeline. It seems I'm ...
0
votes
1answer
107 views

nginx: simplify config for force ssl on specific path for rails app

im using the config below. it works, but the problem for me is the repeating of some lines. the proxy_* directives need to be in location /admin also, because only one location will be executed by ...
1
vote
0answers
70 views

Deploying sinatra app on rails app sub uri using( unicorn and nginx)

I have rails app running on unicorn+nginx. below is the nginx.conf and unicorn.rb configuration. nginx.conf upstream unicorn { server unix:/tmp/unicorn.todo.sock fail_timeout=0; } server{ ...
0
votes
2answers
74 views

App got press, then servers got owned. I added 8 more servers, STILL too slow [duplicate]

Our new app has received a lot of press today, and is getting thousands of new users every hour... but it has become so slow that it's unusable. We're using Rails 3 patched to latest, ubuntu, ...
0
votes
0answers
174 views

Why do I need to precompile Rails assets on app servers?

I'm deploying a simple Rails app to this small ubuntu precise64 server setup : * 1 server running nginx * 2 servers running unicorn * 1 server running postgresql My servers are provisionned with ...
1
vote
2answers
195 views

Nginx + Unicorn multiple apps with locations - routing

I would like to run multiple rails apps with just using different location blocks. Different unicorn workers are started and configured, they are working just fine. Every app is under the same ...
2
votes
1answer
530 views

Unicorn error while hosting a Rails app with NGINX

All of a sudden my app stopped working and these are the last lines I am getting from unicorn.log unicorn worker[0] -D -c /home/deployer/apps/myapp/current/config/unicorn.rb -E production: ...
0
votes
1answer
312 views

Nginx + Unicorn Rails Application gets 404 when requests number are high

I have a Rails application deployed using Nginx + Unicorn. Last night, when the traffic peaked, Nginx was getting lots of 404 errors. When I dig into logs, those 404 requests on the nginx side did not ...
2
votes
1answer
332 views

How to debug why my server has 3s delay on each request nginx/unicorn?

I am trying to debug why my server has 3 seconds delay on each request. These are my nginx and unicorn config files: https://gist.github.com/regedarek/de7f2e5cd1918b6224ac My server info: ...
-1
votes
2answers
636 views

How to restart RoR services after server has been rebooted

Update I have been searching around to see what services would possibly need to be restarted in my project after reboot. One of them was thinking sphinx, which I finally got to the point where it ...
1
vote
1answer
154 views

RHEL 6.x on Rackspace Cloud and Dedicated hardware experiencing Redis Timeouts

I just recently set up a mixture of RHEL 6.1 Rackspace cloud hosts and RHEL 6.2 dedicated hosts using Rackconnect. I am experiencing intermittent Redis timeouts from within our Rails 3.2.8 app with ...
0
votes
1answer
174 views

Unicorn, USR2 and the config file

My Bash script has the following code that doesn't throw an error. echo "Reloading Unicorn if USR2 is enabled" kill -USR2 `cat $PID` if [ -s $OLD_PID ] then kill -WINCH `cat $OLD_PID` && kill -QUIT ...
0
votes
1answer
630 views

unicorn and nginx, went wrong

I try to deploy my app via capistrano. It was done, but when I start to nginx and show my site in the browser I see 'We're sorry, but something went wrong.' It is bad. I use unicorn. See my configs ...
1
vote
2answers
122 views

How do I launch unicorn_rails as a startup script with rvm installed on my ubuntu 12.04 machine?

I have a rails app on my server. I have a script startup.sh which launches unicorn_rails and then nginx. In order to get my server to launch on system boot, I've added a line to call my startup ...
1
vote
1answer
794 views

scalability with nginx, passenger, ruby on rails setup [duplicate]

Possible Duplicate: How do you do Load Testing and Capacity Planning for Web Sites Hey guys I had a question regarding scalability for my RoR application. We have been optimizing our ...
1
vote
1answer
494 views

How to properly secure Unicorn/RoR server on ubuntu? Or, harden RoR application stack?

I have few Unicorn servers running on Ubuntu 12.04 and I am looking to secure them against exploits which give remote shell. My main concern is, if it makes sense to deploy ModSecurity? Another ...
0
votes
1answer
342 views

Session persistence between multiple Rails / Unicorn servers with Redis as session_store on AWS

I've got 2 nginx EC2 instances pointing to 2 Unicorn EC2 instances in a round robin load balanced configuration. The two nginx instances are being the Elastic Load Balancer. Both Unicorn instances ...
4
votes
3answers
2k views

Operation not permitted when starting Unicorn

I've created an nginx/unicorn/capistrato setup on Ubuntu (Amazon EC2) by following mostly this guide. I guess everything is set up like it should but when I start Unicorn I get (a LOT of) this error ...
2
votes
0answers
468 views

Rails, Capistrano, Nginx, Unicorn - Application has been already initialized (RuntimeError)

Can anyone shed some light on what exactly this error refers to? I'm having trouble deploying new versions of the site. I, INFO -- : reloading config_file=[snip]/current/config/unicorn.rb I, INFO ...
0
votes
1answer
487 views

How can I setup nginx to serve virtualhosts with rails(unicorn/passenger) and php-fpm

I would like to serve multiple sites on one instance. I install nginx, php-fpm, and a rails app. I use sites like this to guide me. I configure php-fpm to listen to a local socket listen = ...
3
votes
1answer
594 views

Nginx + Unicorn

I am working on a migration from nginx + passenger to nginx + unicorn and I have reached a point where I am a bit stuck. When I attempt to view my test server, I get nothing but a 404 page. I am sure ...
0
votes
1answer
1k views

Nginx + Unicorn subdomain virtual hosting failure (timeouts)

I have a server set on a VPS serving up a production Rails app via Nginx + Unicorn. Presently this works fine with the following conf files: nginx.conf unicorn.conf However the added subdomain of ...
1
vote
0answers
1k views

How to load environment variables with Unicorn

I can't seem to get my server to load up the environment variables. In my ideal setup I would like 1 user (deployer) to serve multiple applications on a single server. Ubuntu 12.04, Nginx, Unicorn. ...
1
vote
1answer
194 views

Unicorn: Sub-Url Generated Links Broken

I am currently trying to stand up an instance of redmine, however currently The generated links in my redmine instance are all broken. I am attempting to serve redmine from a sub-url i.e ...
1
vote
3answers
266 views

What are the benefits of running a app server in user space, like Unicorn, as opposed to as sudo?

I've been using Phusion Passenger + Rails/Sinatra for a lot of projects. Passenger runs under the main Nginx or Apache process. But I'm interested in Unicorn, partly because it runs in user space. ...
0
votes
1answer
1k views

SSL on nginx + unicorn got “Error 102 (net::ERR_CONNECTION_REFUSED)”

I tried to deploy my app on EC2 (opened port: 22, 80, 443) App: Rails 3.2.2 Server: nginx 1.2.1 unicorn gem (latest) ubuntu 12.04 Deployer: Capistrano I tried to follow the instruction in ...
0
votes
1answer
312 views

Why is there a separate “unicorn_rails” for Rails apps?

According to the Unicorn docs, there are different binaries for Rails apps and other Rack apps: non-Rails Rack applications In APP_ROOT, run: unicorn for Rails applications (should work for ...
1
vote
3answers
2k views

Rails + Nginx + Unicorn multiple apps

I get the server where is currently installed two apps and i need to add another one, here is my configs. nginx.conf user www-data www-data; worker_processes 4; pid /var/run/nginx.pid; events { ...
0
votes
1answer
725 views

memory tuning with rails/unicorn running on ubuntu

I am running unicorn on Ubuntu 11, Rails 3.0, and Ruby 1.8.7. It is an 8 core ec2 box, and I am running 15 workers. CPU never seems to get pinned, and I seem to be handling requests pretty nicely. ...
3
votes
1answer
790 views

Nginx and Unicorn on separate machines

I've got a pretty standard Rails application running with Unicorn and Nginx all on one box. I'd like to split off the application itself and have Nginx on one machine and Unicorn (with the Rails app) ...
0
votes
1answer
788 views

rails cap deploy unicorn issues

Trying to get rails app deployed. Everything is installed nginx, unicorn, setup. Error Im getting: [109.etc] env RAILS_ENV=production sh -c 'kill -s USR2 '\''cat /tmp/unicorn.pid'\''' sh: ...
10
votes
2answers
4k views

Optimal number of per CPU unicorn processes

We are running a Ruby on Rails web app under Unicorn. Our app is not strictly CPU bound (we have a dual Xeon E5645 system w/12 cores and a peak load average value is around 6). We started with 40 ...
0
votes
1answer
1k views

unicorn/rails server errors in production, but doesn't write to log or stderr

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 ...
1
vote
1answer
216 views

How do I decide if I need to introduce HAProxy into my nginx-unicorn stack for my web application?

I'm building a service-based web application. It consists of one primary rails app purely meant to handle requests, and a lot of other sinatra services running to actually process these requests. ...
4
votes
3answers
3k views

Using Upstart to manage Unicorn w/ rbenv + bundler binstubs w/ ruby-local-exec shebang

Alright, this is melting my brain. It might have something to do with the fact that I don't understand Upstart as well as I should. Sorry in advance for the long question. I'm trying to use Upstart ...
1
vote
1answer
494 views

Linode Debian + rvm + nginx + Unicorn kills master at boot or doesn't start unicorn

I'm a new Linode/Linux user running Debian 6. I'm trying to get my Unicorn server to start at boot, but for some reason it is not, and I'm not able to track down any error message. Nginx is starting ...
3
votes
1answer
664 views

Writing an upstart config file for Unicorn

I've had a good hunt and can't find a good example of an upstart script for Unicorn. From what I've read however I think that upstart and unicorn might step on each others toes if I just try to set ...
0
votes
1answer
125 views

unicorn_rails throwing memory corruption error

I've been running a nginx+unicorn rails application successfully on EC2 for a while but I decided to get a test server up in one of my VPS servers. I just installed nginx in my VPS, got the gems all ...
1
vote
1answer
2k views

Where does Varnish usually go in a Rails web stack?

I have a production Rails application deployed on Unicorn with nginx in front for static file serving. I now need some features of Varnish and I'm wondering how to introduce it. Some people put ...
0
votes
1answer
272 views

Unicorn Worker Pool going idle and slowing down a lot after a period of time

I'm running Teambox community edition on an Ubuntu Server machine, with 600Mhz and 358MB of RAM. I know it's not much and that's probably the cause of all the trouble I'm having, but maybe someone ...
1
vote
1answer
723 views

Apache proxying to Unicorn server times out, how to avoid?

I have a Teambox installation running on Unicorn, and the latter sometimes times out after 30 seconds. The idea of this configuration would be for Apache to wait until the Unicorn master server sends ...
0
votes
1answer
646 views

Unicorn 3 throwing tons of errors (Rails 3.0.3, Unicorn 3.0)

I just tried to upgrade to Unicorn 3.0. I changed my Gemfile and did a bundle install. When restarting my Unicorn I got tons of errors beginning with: Unhandled listen loop exception ...