Stub_status explenation needed

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?
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?

Thank you in advance for any tip or a help in understanding this issue.

Regards
Piotr Pawlowski

Posted at Nginx Forum:
http://forum.nginx.org/read.php?2,222771,222771#msg-222771

Hello!

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

of the application
Active connections: 4
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
too.

Maxim D.

And everything is clear now, thank you Maxim !

Posted at Nginx Forum:
http://forum.nginx.org/read.php?2,222771,222834#msg-222834

follow up question…

if you a polling it every min and getting 300 “Requests” is it per
“Active”
connection?

tia,

Hello!

On Wed, Feb 29, 2012 at 10:34:15AM -0500, J M wrote:

follow up question…

if you a polling it every min and getting 300 “Requests” is it per “Active”
connection?

ENOPARSE, sorry.

“Active” is about number of currently established connections, and
“Requests” is about requests seen in the past. These numbers are
mostly unrelated.

Maxim D.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs