Request queue length
normalperson at yhbt.net
Sun Feb 6 14:02:35 EST 2011
Troex Nevelin <list at mrtech.ru> wrote:
> Is there a way to get the number of requests that are currently awaiting
> to be executed by my rails app by unicorn?
> Or there is no queue in unicorn and I should look for this information
> somewhere in nginx or other front-end server?
The queue is in the kernel and controlled by the listen(2) syscall.
If you're in Linux, you can inspect this with Raindrops or just
read the output of ss(8) or /proc/net/tcp. I don't know how to do
this in non-Linux kernels.
All TCP servers actually have this queue, so you can use ss(8),
/proc/net/tcp or raindrops to inspect this queue in nginx, too.
I've found this example surprisingly useful, too:
More information about the mongrel-unicorn