The disk space used by the file storage on our Phabricator installation has been growing a lot lately. The past days, a flood of files has appeared in bulk, which made us think of a kind of flooding attack. After investigating, all those files are transforms of image files. I have a couple questions regarding those files.
- Why did they appear in bulk? If the transforms were not needed when the original file was uploaded, we’d rather not generate useless transforms.
- How to delete them? We don’t really care if the transforms are missing, as long as the original files stay. We can always regenerate transforms manually if needed. It seems easy to delete the files from the database, but then the actual files in the disk storage would stay here, and we would not reclaim any disk space.
- Follow-up question: is it possible to check that all the files on the disk are actually indexed in Phabricator? The growth of the storage folder made me a bit suspicious and I would like to make sure that no data is actually stale. Is there a way to monitor that, or to run some garbage collection? As far as I can see, the
bin/filesutilities only allow one to check the integrity of disk files using the database, not the other way around.
Thank you very much in advance for your input!