Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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 have an Nginx and Passenger setup that is proving problematic.

At relatively low loads the server seems to get backed up and start churning results like this into the error.log:

connect() to unix:/passenger_helper_server failed 
(11: Resource temporarily unavailable) while connecting to upstream

My passenger setup is:

passenger_min_instances 2;
passenger_pool_idle_time 1200;
passenger_max_pool_size 20;

I have done some digging, and it looks like the CPU gets pegged. Memory usage seems fine passenger_memory_stats shows at most about 700MB being used, but CPU approaches 100%.

is this enough to cause this type of error?

Should i bring the pool size down? Are there other configuration settings I should be looking at?

Any help appreciated

Other pertinent information:

  • Amazon EC2 Small Instance
  • Ubuntu 10.10
  • Nginx (latest stable)
  • Passenger (latest stable)
  • Rails 3.0.4
share|improve this question
Hi, I've exactly the same problem, with some traffic I got that error I'm googling around and here there is a guy with that problem, nginx+php:… My config: nginx/0.6.35 + Phusion Passenger 2.2.10 passenger_max_pool_size 6; passenger_pool_idle_time 3600; Please let me know if you find a solution, I'll do the same. Thank you – user72939 Mar 3 '11 at 13:16
Same problem here. Did you ever find a solution? – Hates_ Aug 9 '11 at 9:57
Never did find the answer, but decreasing the passenger pool helped immensely. – Toby Hede Aug 11 '11 at 10:58
what did you decrease it to? – jdkealy Jan 14 '13 at 5:11
@jdkealy can't recall from memory, but I think I started at about 5 and worked my way back up until I saw the error again. – Toby Hede Jan 16 '13 at 10:24

With the CPU approaching 100% and looking at the specs of the EC2 small instance, it sounds to me like your machine is swapping. Have a look at the output of free -m while you boot up the server and then watch it when you do some load testing.

From the docs of Phusion Passenger

A larger number results in higher memory usage, but improves the ability to handle concurrent HTTP requests.

Do you really need to handle a lot of concurrent requests? If so, you should probably invest in a larger EC2 instance and then turn up your passenger_max_pool_size. It doubt that you will need more than the default of 6 that passenger provides with that little machine.

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.