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 -----------
/apps/mailapp/current:
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).