|
|
acda74 |
From 64dbfdfe3ed2fc8f252ce138f6213b529edb2407 Mon Sep 17 00:00:00 2001
|
|
|
acda74 |
Message-Id: <64dbfdfe3ed2fc8f252ce138f6213b529edb2407@dist-git>
|
|
|
acda74 |
From: Peter Krempa <pkrempa@redhat.com>
|
|
|
acda74 |
Date: Wed, 15 Feb 2023 10:48:31 +0100
|
|
|
acda74 |
Subject: [PATCH] rpc: Don't warn about "max_client_requests" in
|
|
|
acda74 |
single-threaded daemons
|
|
|
acda74 |
MIME-Version: 1.0
|
|
|
acda74 |
Content-Type: text/plain; charset=UTF-8
|
|
|
acda74 |
Content-Transfer-Encoding: 8bit
|
|
|
acda74 |
|
|
|
acda74 |
The warning about max_client_requests is hit inside virtlogd every time
|
|
|
acda74 |
a VM starts which spams the logs.
|
|
|
acda74 |
|
|
|
acda74 |
Emit the warning only when the client request limit is not 1 and add a
|
|
|
acda74 |
warning into the daemon config to not configure it too low instead.
|
|
|
acda74 |
|
|
|
acda74 |
Fixes: 031878c2364
|
|
|
acda74 |
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2145188
|
|
|
acda74 |
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
|
|
|
acda74 |
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
|
|
|
acda74 |
(cherry picked from commit b3f8e072fe08a6beaf3ec3d27e02efee4358b2ca)
|
|
|
acda74 |
---
|
|
|
acda74 |
src/remote/libvirtd.conf.in | 1 +
|
|
|
acda74 |
src/rpc/virnetserverclient.c | 3 ++-
|
|
|
acda74 |
2 files changed, 3 insertions(+), 1 deletion(-)
|
|
|
acda74 |
|
|
|
acda74 |
diff --git a/src/remote/libvirtd.conf.in b/src/remote/libvirtd.conf.in
|
|
|
acda74 |
index 80a98b1529..32a680317a 100644
|
|
|
acda74 |
--- a/src/remote/libvirtd.conf.in
|
|
|
acda74 |
+++ b/src/remote/libvirtd.conf.in
|
|
|
acda74 |
@@ -374,6 +374,7 @@
|
|
|
acda74 |
# connection. To avoid one client monopolizing the server
|
|
|
acda74 |
# this should be a small fraction of the global max_workers
|
|
|
acda74 |
# parameter.
|
|
|
acda74 |
+# Setting this too low may cause keepalive timeouts.
|
|
|
acda74 |
#max_client_requests = 5
|
|
|
acda74 |
|
|
|
acda74 |
# Same processing controls, but this time for the admin interface.
|
|
|
acda74 |
diff --git a/src/rpc/virnetserverclient.c b/src/rpc/virnetserverclient.c
|
|
|
acda74 |
index b5c764b1b0..bdb3552c5d 100644
|
|
|
acda74 |
--- a/src/rpc/virnetserverclient.c
|
|
|
acda74 |
+++ b/src/rpc/virnetserverclient.c
|
|
|
acda74 |
@@ -1261,7 +1261,8 @@ static virNetMessage *virNetServerClientDispatchRead(virNetServerClient *client)
|
|
|
acda74 |
client->rx->bufferLength = VIR_NET_MESSAGE_LEN_MAX;
|
|
|
acda74 |
client->rx->buffer = g_new0(char, client->rx->bufferLength);
|
|
|
acda74 |
client->nrequests++;
|
|
|
acda74 |
- } else if (!client->nrequests_warning) {
|
|
|
acda74 |
+ } else if (!client->nrequests_warning &&
|
|
|
acda74 |
+ client->nrequests_max > 1) {
|
|
|
acda74 |
client->nrequests_warning = true;
|
|
|
acda74 |
VIR_WARN("Client hit max requests limit %zd. This may result "
|
|
|
acda74 |
"in keep-alive timeouts. Consider tuning the "
|
|
|
acda74 |
--
|
|
|
acda74 |
2.39.1
|
|
|
acda74 |
|