ASTRAPI Posted December 7, 2020 Posted December 7, 2020 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"); Some related info on how to get the size of the bucket also: https://stackoverflow.com/questions/3910071/check-file-size-on-s3-without-downloading https://www.cloudsavvyit.com/1755/how-to-get-the-size-of-an-amazon-s3-bucket/ https://serverfault.com/questions/84815/how-can-i-get-the-size-of-an-amazon-s3-bucket But i think that you know how to do it anyway 🙂 Thanks !!!! Please add this asap as it is very important ! Haku2 and AlexWright 2
Management Charles Posted December 7, 2020 Management Posted December 7, 2020 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. VR6Pete and G17 Media 2
ASTRAPI Posted December 8, 2020 Author Posted December 8, 2020 (edited) 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 December 8, 2020 by ASTRAPI
Recommended Posts