I have a rails application that takes a while to process certain requests (as it processes image uploads). I currently have three mongrel processes in a cluster, and I expect one of the other two to handle a second request if the first one is busy.
However, this doesn't seem to be happening. If I watch the output from top
on the server, I can tell when it is resizing an image, so if I try to hit the application with an easy request (which would normally finish quickly), it seems to wait until the long-running request in finished.
When I look in the log/mongrel.xxxx.log files, all I see is the output from the application starting up.
How can I verify which process is actually handling each request?
Can I get them mongrels to log each request (even if it is just a timestamp, and something like 'GET /path/to/resource')?
Any ideas why the cluster might not be sharing the load in the first place?
The front-end web server is nginx, so maybe that is where I should be looking? The nginx access_log doesn't seem to have anything in it about where the request was proxied to.