Unicorn is an HTTP server for Rack applications designed to only serve fast clients on low-latency, high-bandwidth connections and take advantage of features in Unix/Unix-like kernels. http://unicorn.bogomips.org/

learn more… | top users | synonyms

1
vote
2answers
152 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
916 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
625 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
444 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 ...
0
votes
1answer
671 views

custom 502 bad gataway for nginx, cannot get it to work, whats wrong?

Im trying to catch a 502 bad gataway for nginx with unicorn. This error is thrown when unicorn is not running. Im trying to use a custom error page instead for when unicorn is not running to no avail. ...
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
628 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
643 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
739 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
2k 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
votes
1answer
2k views

Permission denied when starting Unicorn on Ubuntu

I'm not familiar with Ubuntu and some problem with server settings for my Rails app. I've created deployer user in admin group (%admin ALL=(ALL) ALL). It was all ok, but when I'm trying to start ...
1
vote
1answer
210 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
1answer
3k views

Forward real IP through Haproxy => Nginx => Unicorn

How do I forward the real visitors ip adress to Unicorn? The current setup is: Haproxy => Nginx => Unicorn How can I forward the real IP address from Haproxy, to Nginx, to Unicorn? Currently ...
0
votes
1answer
468 views

Redmine served via Apache / Unicorn

I am currently trying to get an instance of redmine up and running. I have been successful so far, however I am now hitting a road block with the apache / unicorn configuration. The following conf ...
1
vote
3answers
319 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. ...
9
votes
4answers
8k views

Need to increase nginx throughput to an upstream unix socket — linux kernel tuning?

I am running an nginx server that acts as a proxy to an upstream unix socket, like this: upstream app_server { server unix:/tmp/app.sock fail_timeout=0; } server { listen ...
0
votes
1answer
2k 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
447 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 { ...
3
votes
1answer
589 views

Unicorn behind ELB, no nginx

If I understand Unicorn right (and in particular from their philosophy doc) it seems like Unicorn was really designed to operate behind a reverse proxy like nginx. My question is: can I drop nginx ...
0
votes
1answer
798 views

memory tuning with rails/unicorn running on ubuntu [duplicate]

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
960 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
907 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
5k 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
2k 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
227 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. ...
0
votes
1answer
2k views

Multiple Unicorns/Rails Apps, Nginx, One User

I successfully deployed a Rails app using Capistrano, Unicorn, Nginx using the following unicorn configuration: env = ENV["RAILS_ENV"] || "development" worker_processes 4 listen ...
0
votes
1answer
255 views

Nginx unicorn: firefox is redirected to proxy_pass

I have the following setup to process certain domains with rails via unicorn: http { # ... upstream unicorn_server { # This is the socket we configured in app's config unicorn.rb ...
0
votes
1answer
100 views

Should I create a system user for unicorn server?

When running a Unicorn server on Linux I am debating whether to run the service under a system or normal user. Which one should I use and why?
1
vote
1answer
1k views

Unicorn and copy_on_write_friendly?

While researching Unicorn configuration options I came across this snippet.. GC.respond_to?(:copy_on_write_friendly=) and GC.copy_on_write_friendly = true If I undertand correctly, it optimizes ...
6
votes
2answers
2k views

How to define different stop/restart signals with upstart

I am starting to convert all of our systems to using upstart to manage our various application processes. One thing that I am constantly missing is the ability to send a different signal to the ...
4
votes
3answers
4k 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 ...
2
votes
1answer
1k views

can nginx retry request if unicorn is overloaded and returns a 502?

Is it possible to have nginx retry a second backend before returning a 502 to the client? Would something like this work? Front end: # haproxy:85 => [a few app servers]:8000 # more specifically: ...
0
votes
1answer
294 views

Debian + Nginx + Unicorn Rails 3 project permissions

Is there a security risk in running a web server like Unicorn as root? The Nginx master process runs as root, the Nginx worker runs as the limited www-data user, but I can't set another user like ...
1
vote
1answer
523 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 ...
2
votes
1answer
211 views

configure www.example.com as example.com

I am using nginx as server backend sqlbuddy.example.com - for db manage (php-fpm) example.com - main site (unicorn) When I go to www.example.com I get sqlbuddy.example.com How do I get ...
3
votes
1answer
711 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 ...
1
vote
0answers
474 views

How are these AB Benchmarks for a ruby/unicorn/nginx/ app running on ec2?

I am preparing to go live with an app, and was wondering if someone can give me some insight on my benchmarks. How do they compare, what system level tweaks can I make to improve them etc. My setup ...
2
votes
1answer
2k views

Apache / Unicorn: how to get Apache to serve static files

I'm following this tutorial to install apache + unicorn but it seems that apache doesn't serve any of the static files. Here's the config I came up with (take a look at Redirect all non-static ...
0
votes
2answers
814 views

Unicorn retains same PID when receives USR2?

So, I've been playing with a unicorn deployment on my personal server. There are a variety of reasons behind this - one of them being that I didn't particularly want to have to compile my own version ...
2
votes
1answer
2k views

Trouble with nginx config and upstream servers

I'm trying to configure two applications to be served up by nginx. The first seems to be working fine and I duplicated the config for the second, however I'm having some problems. I'm running a ...
0
votes
1answer
133 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 ...
0
votes
2answers
759 views

Unicorn installation error on Debian 5

I am running ruby1.9 on Debian 5, and did not manage to install 'unicorn' with rubygems. I got this error and do not really know how to solve it. Do you have any idea of the possible root cause ? ...
2
votes
1answer
314 views

Nginx and unicorn

I have 2 aplications, each one running on unicorn. I'd like to use nginx as a front end for each of those application. For each nginx / unicorn pair I would then use a dedicated unix socket. To do so, ...
2
votes
1answer
1k views

Monitoring slow nginx/unicorn requests

I'm currently using Nginx to proxy requests to a Unicorn server running a Sinatra application. The application only has a couple of routes defined, those of which make fairly simple (non costly) ...
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
285 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
751 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
2answers
2k views

Unicorn 3.3.1 and Rack 1.1.0 issues?

I'm upgrading from the Ruby Enterprise Edition 1.8.6 to the latest 1.8.7 version with Unicorn to facilitate an upgrade to Rails 2.3.10, and am running into some issues. Should I uninstall the older ...