Stub_status explenation needed

Maxim Dounin mdounin at
Tue Feb 21 12:59:47 UTC 2012


On Tue, Feb 21, 2012 at 04:28:02AM -0500, piotr.pawlowski wrote:

> Dear all,
> I am not quite sure how to understand stub_status module output. I have
> three servers, on which I have this module turned on.
> Maybe servers infrastructure is the key here, so let me explain it:
> * ProxyServer - server with NginX, where all requests are coming and
> proxied to other two servers
> * WebServer - server with NginX and PHP, where 90% of our application is
> running
> * DbServer - server with databases but also with NginX and PHP for rest
> of the application
> Now, for WebServer and DbServer, stub status looks as follows:
> DbServer:
> Active connections: 1 
> server accepts handled requests
>  1749046 1749046 1749046 
> Reading: 0 Writing: 1 Waiting: 0 
> WebServer:
> Active connections: 4
> server accepts handled requests
>  142484042 142484042 142484042
> Reading: 0 Writing: 4 Waiting: 0
> As you can see, all values (accepts, handled, requests) are the same,
> which, in my opinion, is good (am I right?).
> Now below is output from ProxyServer:
> Active connections: 1225 
> server accepts handled requests
>  199105 199105 573654 
> Reading: 3 Writing: 5 Waiting: 1217 
> First thing, which worries me, is the fact, that values for 'accepted'
> and 'handled' are a lot of different that value of 'requests'. Does it
> mean, that less than 40% of requests are not handled by NginX?

The "requests" value represents number of http requests, which is 
expected to be different from "accepts" if keepalive connections 
are used.

The "handled" value represents number of handled connections.  It 
must be the same as "accepts" unless some resource limits were 
reached (e.g. worker_connections overflow).  I.e. if your see 
"handled" less than "accepts" - it means you have problem and some 
client connections were dropped.

> Second thing is, that amount of 'Active connections' and 'Waiting' is
> very high...
> Should I be worried about those values? Or everything is ok and my
> attitude to my server is hypersensitive?

The "waiting" represents number of keepalive connections.  It's 
expected to be high if you have keepalive enabled.  The "active 
connections" includes "waiting" so it's expected to be high 

Maxim Dounin

More information about the nginx mailing list