[collectd] Apache stats don't include async connections
Phil Endecott
spam_from_collectd at chezphil.org
Sat Aug 12 13:23:10 CEST 2017
Dear Experts,
The graphs that I got from collectd's Apache plugin seemed to
show too few connections, so I investigated.
It seems that when using the (newish) "event" mpm, Apache can put
some connections into an "async" state. Typically this is
connections that are in keep-alive, waiting for another request
from the same host, and (possibly) connections that are sending
a file using sendfile(). In this state the connections do not
take up a server thread.
In the server-status?auto output, these connections do not appear
as characters in the Scoreboard: line. Instead they are counted in
additional lines, ConnsAsyncWriting, ConnsAsyncKeepAlive and
ConnsAsyncClosing. Here is a fragment of my server-status?auto :
BusyWorkers: 1
IdleWorkers: 49
ConnsTotal: 7
ConnsAsyncWriting: 2
ConnsAsyncKeepAlive: 3
ConnsAsyncClosing: 0
Scoreboard: ....................................................................................................______________W___________________________________..................................................................................................................................................................................................................................................................................................................................................................................................................................................................
collectd shows just one connection.
I think that, ideally, I'd like to graph the ConnsTotal: value.
Any thoughts anyone?
On a related matter, the reason I was looking at this was that my
Apache instance was misbehaving and I was hoping to see some clues
about what was going wrong in the collectd graphs. But there were
just gaps, because collectd does an exponential backoff when its
attempt to read server-status fails after 10 seconds. This is
exactly the wrong behaviour - when the server is being very slow to
respond I want collectd to try harder to get the statistics!
(I confess I have not yet looked to see if there is any way to
adjust this.)
Thanks,
Phil.
More information about the collectd
mailing list