Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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 have a Redis session_store configured which is in a master/slave configuration with an Elastic IP attached to the master.

I've tried configuring the session stickiness on the load balancer, but sessions are lost on each page refresh.

I'm using the redis-store gem for the session_store configuration and redis support.

Anyone have any ideas as to why this is not working?

share|improve this question
up vote 0 down vote accepted

I figured it out. In the location section of the nginx configuration file, I had to add two additional proxy parameters:

proxy_next_upstream     error timeout invalid_header http_500;
proxy_connect_timeout   2;
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.