Whenever the number of outstanding requests being served reaches
max_client_requests, the RPC server applies RX throttling and
temporarily stops receiving incoming data. Consequently, it stops
receiving the keep-alive responses from the client and eventually
may cause a connection timeout on the server-side.
This patch emits a warning message in such cases so that the users
may root-cause the connection timeout and reconfigure
max_client_requests depending on their application.
Signed-off-by: Ivan Teterevkov <ivan.teterevkov(a)nutanix.com>
---
src/rpc/virnetserverclient.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/src/rpc/virnetserverclient.c b/src/rpc/virnetserverclient.c
index 7050430e17..9d86e1ba3e 100644
--- a/src/rpc/virnetserverclient.c
+++ b/src/rpc/virnetserverclient.c
@@ -1293,6 +1293,10 @@ static virNetMessage
*virNetServerClientDispatchRead(virNetServerClient *client)
client->rx->buffer = g_new0(char, client->rx->bufferLength);
client->nrequests++;
}
+ } else {
+ VIR_WARN("Applying RPC throttling, consider increasing "
+ "max_client_requests (client->nrequests_max=%zu)",
+ client->nrequests_max);
}
virNetServerClientUpdateEvent(client);
--
2.35.0-rc0