]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: stream: measure and report a stream's call rate in "show sess"
authorWilly Tarreau <w@1wt.eu>
Wed, 24 Apr 2019 06:28:31 +0000 (08:28 +0200)
committerWilly Tarreau <w@1wt.eu>
Wed, 24 Apr 2019 14:04:23 +0000 (16:04 +0200)
commit2e9c1d2960f2472e0a49fa55dd96610c253c583d
treec58b3a68a01e10e8d8c26ed21c52e7c95df6297b
parent0212fadd658bfcade0342dea708e398b47e31188
MINOR: stream: measure and report a stream's call rate in "show sess"

Quite a few times some bugs have made a stream task incorrectly
handle a complex combination of events, which was often reported as
"100% CPU", and was usually caused by the event not being properly
identified and flushed, and the stream's handler called in loops.

This patch adds a call rate counter to the stream struct. It's not
huge, it's really inexpensive (especially compared to the rest of the
processing function) and will easily help spot such tasks in "show sess"
output, possibly even allowing to kill them.

A future patch should probably consist in alerting when they're above a
certain threshold, possibly sending a dump and killing them. Some options
could also consist in aborting in order to get an analyzable core dump
and let a service manager restart a fresh new process.
include/types/stream.h
src/stream.c