disk API timeout on node with too many disks

illustris

Member
Sep 14, 2018
22
4
23
34
I have a node with an external JBOD enclosure connected through two SAS cables. There are ~80 disks in the enclosure, so they show up as ~160 disks on PVE. When opening the "disks" page for this node, the request to /api2/json/nodes/<node_name>/disks/list?include-partitions=1 times out after 30 seconds. I tried running this perl script to time how long it actually takes:
Perl:
#!/usr/bin/perl

use strict;
use warnings;
use PVE::Diskmanage;

my $disks = PVE::Diskmanage::get_disks();

# Print the result
use Data::Dumper;
print Dumper($disks);

It returns the correct result, but consistently takes about 35 seconds to complete because each call to udevadm+smartctl takes around 200ms. Execsnoop logs attached.

I'll open an issue for a more proper fix (maybe paging or setting the timeout dynamically based on the number of disks). But until then, is there some way to increase the timeout for the API?
 

Attachments

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!