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 have a site with a relatively low amount of traffic that's normally served happily by 3 or 4 passenger instances.

However, sometimes it is getting hammered by a large number of automated requests that can take up to 15-20 seconds to completed. This results in the global queue backing up and the server becoming unresponsive to ordinary users:

----------- General information ------
max      = 18                                       
count    = 18                                       
active   = 17                                       
inactive = 1                                        
Waiting on global queue: 115                        

Fifteen minutes later, after restarting apache to clear the queue everything is back to normal:

----------- General information -----------
max      = 18
count    = 4
active   = 0
inactive = 4
Waiting on global queue: 0

----------- Application groups -----------
  App root: /apps/mailapp/current
  * PID: 31044   Sessions: 0    Processed: 275     Uptime: 14m 21s
  * PID: 31047   Sessions: 0    Processed: 314     Uptime: 14m 21s
  * PID: 31060   Sessions: 0    Processed: 284     Uptime: 14m 17s

I've push up the max number of instances to 18 (about as many as can concurrently run on the VPS) which has helped a little, but not much. I've optimized the request as much as I can (down from 30 seconds or so to 15-20 seconds).

As the requests that are causing it to back up are automated, there is no need to serve them in a particularly timely manner. Is there any way that I can set aside a number of passenger instances that just serve this particular request?? (based on url path maybe).

share|improve this question
Did you get anywhere with this? I was just about to ask exactly the same question when I found yours. – Loop Space Dec 7 '11 at 8:57
up vote 0 down vote accepted

I sort of fixed this.

I have created a new virtual host with apache with limits on the max number of instances.

This was symlinked on the os to point to the original app. This lets me run the main app with as many instances as I need, but with restrictions on how many instances the symlinked virtual host can run.

This has raised a somewhat related issue regarding cpu-usage on the symlinked host: Apache/Passenger and cpulimit

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.