Jump to content

The ultimate community for Ruby on Rails developers.


Unicorn dies unless backlog very small?

unicorn backlog rails

  • Please log in to reply
No replies to this topic

#1 Mark Wolgemuth

Mark Wolgemuth


  • Members
  • 1 posts

Posted 10 October 2013 - 12:33 AM

Hi folks,


We just migrated from raiils 2.3.11 to 4, ruby 1.9.1 to 2 and switched passenger to unicorn.


Through trial by fire load testing, I have ascertained that our unicorn daemons will lock up and die over a certain load if tcp backlogs are set over a certain point.


We run nginx in front, and it has a huge backlog allowance. I had let unicorn use its default, then raised it then lowered it, steadily until I got to a 1:1 worker to backlog allowance. It was only at this point that unicorn has stayed responsive for more than 1 hour  / 100K reqs.


Has anyone else experience instability with unicorn's handling of the tcp backlog? I'm inclined to try reducing it to 0.


Logically, I can't see why unicorn should be allowed ANY connect backlog if nginx is in front of it.

Also tagged with one or more of these keywords: unicorn, backlog, rails

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users