• We value your experience with Plesk during 2025
    Plesk strives to perform even better in 2026. To help us improve further, please answer a few questions about your experience with Plesk Obsidian 2025.
    Please take this short survey:

    https://survey.webpros.com/
  • On Plesk for Linux mod_status is disabled on upgrades to improve Apache security.
    This is a one-time operation that occurs during an upgrade. You can manually enable mod_status later if needed.

Forwarded to devs XML-RPC API disk space usage for subscription/webspace does not include subdomains

Kaspar

API expert
Plesk Guru
Username:

TITLE


XML-RPC API disk space usage for subscription/webspace does not include subdomains

PRODUCT, VERSION, OPERATING SYSTEM, ARCHITECTURE

Plesk: 18.0.73#5
OS: Alma 9

PROBLEM DESCRIPTION

It looks like there is a discrepancy in the way disk space usage is calculated on the webspace operator with the XML-RPC API. The disk space usage (returned by the real_size operator) does not include the disk usage for any sub domain belonging to the subscription, but surprisingly it does include the disk usage for any other domains in the same subscription.

I have a couple of scripts that utilize the XML-RPC API to return the disk space usage of all subscriptions. I've been using these scripts for years (since Plesk 17.8) and never noticed this inconsistency before. Which makes me wonder if sub domains have always been excluded from the disk space calculation when using the webspace operator on the XML-RPC API or that this behavior has changed unnoticed some time ago. Of course it could be that I just never noticed that sub domains have been excluded from the disk space calculation.

Regardless, the current logic (for the API) feels inconsistent. As additional domains are included in the disk space calculation, but sub domains are not.

STEPS TO REPRODUCE

1) Setup a subscription in Plesk
2) Add a sub domain and an additional domain to it
3) Fill some of the disk space for demonstration purposes

On the primary domain (download or create a binary file)​
Code:
sudo -u <subscription system user> wget -qP /var/www/vhosts/example.com/httpdocs/ http://speed.transip.nl/10mb.bin
On the sub domain fill the logs​
Code:
for i in {1..6000}; do curl -v 'http://sub.example.com?fill=some_content&count='$i;done
On the additional domain fill the logs​
Code:
for i in {1..5000}; do curl -v 'http://example.bg?fill=some_content&count='$i;done

4) Recalculate statistics
Code:
plesk sbin statistics --calculate-all

5) For reference, lookup the disk space usage in Plesk. The disk space shown for each individual domain correctly adds up to the total disk space usage of the subscription.
diskspace.png
6) Run API call to get subscription disk space usage.
Notice the difference between the subscription disk space returned by the API and the total disk space shown in Plesk.
Code:
curl -kLi -X POST -H "Content-Type: text/xml" -H "HTTP_PRETTY_PRINT: TRUE" -H "HTTP_AUTH_LOGIN: admin" -H "HTTP_AUTH_PASSWD: 1234567890" -d '<?xml version="1.0" encoding="UTF-8"?><packet><webspace><get><filter><name>example.com</name></filter><dataset><gen_info/></dataset></get></webspace></packet>' https://123.123.123.123:8443/enterprise/control/agent.php | grep real_size

ACTUAL RESULT
Notice how the disk space usage returned by the API call for the subscription is not equal to the total disk space usage shown for the subscription in Plesk. The returned value of the API call is only equal to the disk space usage of the primary domain + that of the additional domain.

EXPECTED RESULT
Expected is that the value of the disk space usage of the subscription returned by the API actually matches the total disk space usage.

ANY ADDITIONAL INFORMATION

(DID NOT ANSWER QUESTION)

YOUR EXPECTATIONS FROM PLESK SERVICE TEAM

Confirm bug
 
Last edited:
Thank you for the report, @Kaspar . We have a registered bug (PPPM-14318) for the root cause with the incorrect disk space usage you are describing. I will consult with our team further on the scenario described with the API and get back to you with more details.
 
Hi, @Kaspar . The described behavior indeed falls under the bug identified with PPPM-14318. A fix will be introduced in one of the upcoming Plesk releases. Unfortunately, at this point, I cannot provide any ETA.
 
@Sebahat.hadzhi do you happen to have any information on when this issue got introduced, which Plesk version I mean? Knowing in which version was the last without having this issue would help me setup a new test case.

I am trying to decide how to handle this issue for the existing scripts/API integrations I am running. I could workaround the issue by separately calculating the diskspace for each subdomain and adding it to the subscriptions total disk space. But that's quite a bit of work and if/when this issue gets fixed in an Plesk update my scripts/API integrations then will output a wrong total diskspace again.
 
Last edited:
Hi, @Kaspar . I believe the issue was first noticed in Plesk 18.0.51. I will try to gather more details on the case and provide further clarity in the beginning of the upcoming week. Thank you in advance for your patience in the meantime.
 
@Kaspar , our team moved the report for reiteration. I cannot yet provide details about a potential fix release date, but I will follow up with more details as soon as possible.
 
I apricate that, thank you. Just so I understand the process, does reiterating this report mean that the issue is being reevaluated?
 
Back
Top