[PATCH] rpc: Emit a warning when applying RPC throttling

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxx>
---
 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




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux