A regression was introduced in the commit
2d7e3ddd4 ("BUG/MEDIUM: cli: do
not return ACKs one char at a time"). When the CLI is processing a command
line, we no longer send response immediately. It is especially useful for
clients sending a bunch of commands with very short response.
However, in that state, the CLI applet must state it has no more data to
deliver. Otherwise it will be woken up again and again because data are
found in its output buffer with no blocking conditions. In worst cases, if
the command rate is really high, this can trigger the watchdog.
This patch must be backported where the patch above is, so probably as far
as 3.0.
size_t cli_raw_rcv_buf(struct appctx *appctx, struct buffer *buf, size_t count, unsigned int flags)
{
/* don't send partial responses, we're just yielding to avoid CPU spikes */
- if (appctx->st1 & APPCTX_CLI_ST1_YIELD)
+ if (appctx->st1 & APPCTX_CLI_ST1_YIELD) {
+ applet_have_no_more_data(appctx);
return 0;
+ }
return b_xfer(buf, &appctx->outbuf, MIN(count, b_data(&appctx->outbuf)));
}