Open degoya opened 9 months ago
I had a similar issue when uploading multiple files on a slow server (https://forum.getkirby.com/t/errors-after-file-image-upload/20900). Each finished upload triggers cache deletion.
i still got this error as soon as i flush the cash. Works great and without errors when there are no visitors on the website. As soon as i got some visitors on the website this causes the shown Error.
@lukasbestle The only way I currently could imagine to solve this (besides not doing content changes directly on a high-traffic server), would be to introduce a flag on the cache that gets set while flushing. And while the flag is set, any cache updates are ignored (basically while cache is flushing the page remains uncached).
Where I am struggling: where to put this flag. I think it needs to be a temporary file as it needs to exist across different requests (so not in-memory). But ::flush
is removing the whole cache root and recreating it. So any flag file written to root immediately is deleted as well in the process.
Where I am struggling: where to put this flag. I think it needs to be a temporary file as it needs to exist across different requests (so not in-memory). But
::flush
is removing the whole cache root and recreating it. So any flag file written to root immediately is deleted as well in the process.
maybe the oposite way, when there is a setting the cache will be written, when the setting is not there the cache won't be written?
Description
On our customers high traffic website we get sometime this error messages in the Panel: rmdir(cachefolderpath) Directory is not empty
Expected behavior
Deleting cache without a Error or prevent deleting of not empty folders
Screenshots
or
To reproduce
We where not able to reproduce the error in a local or staging environment by ourselfs. i think the problem is caused by the high traffic. When we remove the cache for 20k+ pages and meanwhile new pages have been cached the folder is not empty and can not be deleted in /vendor/getkirby/cms/src/Filesystem/Dir.php line 553 and causes the error shown above.
Your setup
Kirby Version
4.1.0