AgileVentures/osra — pull request #194 by NikitaAvvakumov (2014-12-04 09:54:20+00:00)
Title: Replace Unicorn with Passenger

https://osraav.atlassian.net/browse/OSRA-274

From Slack:
Replacing the Unicorn server with Passenger seems to have solved, or at least significantly ameliorated, the out-of-memory problems on my Heroku instance. `Admin::PendingOrphanListsController#validate` was the main hog, but within it `Rack::MethodOverride#call` was taking up the most time. Apparently, this thing scans the entire body of POST requests to determine if there are method overrides. After switching to Passenger, `Admin::PendingOrphanListsController#validate` is still the main time consumer on orphan list uploads/imports, but `Rack::MethodOverride#call` has only a small footprint within it. Before, most of request time on upload/import was spent in middleware and Ruby, now it's in request queuing. I suppose that just means that the server is throttling the incoming requests instead of sending them directly to the app. The response time remains about the same, but there have not been any memory issues so far.