mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-11-17 17:01:02 +01:00
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.