From: "Jakob Klocker" <j.klocker@proxmox.com>
To: "Thomas Lamprecht" <t.lamprecht@proxmox.com>,
<pdm-devel@lists.proxmox.com>
Subject: Re: [PATCH proxmox-datacenter-manager v2 2/2] fix #7731: metric collection: allow 5 minutes for PVE metric requests
Date: Tue, 01 Dec 2026 09:17:20 +0100 [thread overview]
Message-ID: <DN98XO1RMKPD.2MNH914H36NO6@proxmox.com> (raw)
In-Reply-To: <d94454dc-c6ad-4a9f-b81b-b7700a0df3e1@proxmox.com>
On Mon Nov 30, 2026 at 9:09 PM CET, Thomas Lamprecht wrote:
> Am 27.11.26 um 15:04 schrieb Jakob Klocker:
>> Exporting the full metric history of a large PVE cluster can take
>> minutes: on a 25-node cluster with about 2800 guests, the export took
>> 2m43s. The client's request timeout of 60 seconds cut such requests
>> off, and the request was repeated on every other endpoint of the remote
>> until all of its nodes were marked unreachable, so no metrics were ever
>> collected for such a cluster.
>>
>> Use a client with a 5 minute timeout for fetching the metrics of PVE
>> remotes. All other requests keep the shorter timeout, so they still
>> fail over quickly to the next endpoint when a node does not answer.
>>
>> Signed-off-by: Jakob Klocker <j.klocker@proxmox.com>
>> ---
>> server/src/metric_collection/remote_collection_task.rs | 7 ++++++-
>> 1 file changed, 6 insertions(+), 1 deletion(-)
>>
>> diff --git a/server/src/metric_collection/remote_collection_task.rs b/server/src/metric_collection/remote_collection_task.rs
>> index 1e0011cb..b5d102fa 100644
>> --- a/server/src/metric_collection/remote_collection_task.rs
>> +++ b/server/src/metric_collection/remote_collection_task.rs
>> @@ -36,6 +36,9 @@ const METRIC_COLLECTION_STATE_FILE: &str = concat!(
>>
>> pub const MAX_CONCURRENT_CONNECTIONS: usize = 20;
>>
>> +/// Timeout for fetching the metrics of a PVE remote.
>> +const PVE_METRICS_REQUEST_TIMEOUT: Duration = Duration::from_secs(5 * 60);
>> +
>> /// Default metric collection interval.
>> pub const DEFAULT_COLLECTION_INTERVAL: u64 = 600;
>> /// Minimum metric collection interval.
>> @@ -315,7 +318,9 @@ impl RemoteMetricCollectionTask {
>> let res: Result<RrdStoreResult, Error> = async {
>> match remote.ty {
>> RemoteType::Pve => {
>> - let client = app.client_factory().make_pve_client(&remote)?;
>> + let client = app
>> + .client_factory()
>> + .make_pve_client_with_timeout(&remote, PVE_METRICS_REQUEST_TIMEOUT)?;
>> let metrics = client
>> .cluster_metrics_export(
>> Some(true),
>
>
> As per my reply to the [v1] this should not be required, but if I'd
> also add a general timeout to avoid that retrying all other nodes on
> a remote adds up to a huge total timeout (12 nodes one hour), i.e.
> something like bellow the scissors.
>
> [v1]: https://lore.proxmox.com/pdm-devel/3278ee5b-95a3-4477-90de-e863359340ef@proxmox.com/
>
Thanks for the feedback! I'll drop this for now and come back to it if
users still run into the timeout once the export endpoint fetches
asynchronously. If it turns out to be necessary, I'll make sure to
include your patch. I'll also make sure to test your async export
series and report back there.
prev parent reply other threads:[~2026-12-01 8:17 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-27 14:03 [PATCH proxmox-datacenter-manager v2 0/2] fix #7731: metric collection: allow 5 minutes for PVE metric requests Jakob Klocker
2026-11-27 14:03 ` [PATCH proxmox-datacenter-manager v2 1/2] connection: allow creating PVE clients with a custom request timeout Jakob Klocker
2026-11-27 14:03 ` [PATCH proxmox-datacenter-manager v2 2/2] fix #7731: metric collection: allow 5 minutes for PVE metric requests Jakob Klocker
2026-11-30 20:09 ` Thomas Lamprecht
2026-12-01 8:17 ` Jakob Klocker [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=DN98XO1RMKPD.2MNH914H36NO6@proxmox.com \
--to=j.klocker@proxmox.com \
--cc=pdm-devel@lists.proxmox.com \
--cc=t.lamprecht@proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.