Jump to content

Adding a server disk space check and S3 Cloud files size che


ASTRAPI

Recommended Posts

Hello

I think it is very important to add a check for server free disk space and check also the files size from S3 Cloud before starting the transfering from S3 back to server.

If the available free disk space on the server is not enough for the files that coming from the S3 cloud back then the server will be full and the server will die.

Nothing will work with 0 free space and the user will be in a case that he will not be able to revert that task and the only solution will be to request from the data center extra hard disks to added on the server.

Until then the forum will be down ....

Doesn't seem hard to add that very useful info for the user when he will try to run that task and from a quick check i found:

https://www.php.net/manual/en/function.disk-free-space.php

For Linux hosts:

$df = round(disk_free_space("/") / 1024 / 1024 / 1024);
print("Free space: $df GB");

Or in your case it sounds like you're running on Windows so:

$df = round(disk_free_space("C:") / 1024 / 1024 / 1024);
print("Free space: $df GB");

 

Please add this asap as it is very important !

Link to comment
Share on other sites

  • Management

This is one of those cases where you need to be sure you are aware of what you are doing when you are self-hosting. I do not believe our software should be in the business of helping you run your server. You should have the technical know how to check your S3 bucket size and your own server's disk space before starting a file storage move.

Keeping track of server disk space or S3 bucket size is not really up to our software - that is the job of the system administrator.

Link to comment
Share on other sites

I am not saying that Invision platform should monitor the disk space of the server.

I just had an idea to warn the user that the specific Invision task will not work and will kill the server/forum on the above specific scenario.

Thanks @Charles

Edited by ASTRAPI
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Upcoming Events

    No upcoming events found
×
×
  • Create New...