Warning spam
-
Hello,
we are seeing a very large number of PHP warnings coming from
wpFastestCache.php, specifically around lines 2285, 2291 and 2294, during cache cleanup operations.The warnings are always of this type:
unlink(...): No such file or directoryrmdir(...): No such file or directoryscandir(...): Failed to open directory: No such file or directory
Example paths involved:
/wp-content/cache/tmpWpfc/1776866749/.../index.html/wp-content/cache/tmpWpfc/1776866749/.../feed/index.xml/wp-content/cache/tmpWpfc/1776866749/...
From the pattern, this looks very much like a race condition / duplicate cleanup attempt on the temporary cache folder.
In practice, the plugin seems to try to delete or scan files/directories that have already been removed earlier in the same cleanup cycle, or by another parallel process/request.What makes us think this is not a real filesystem problem but rather a cleanup logic issue:
- The warnings affect many different paths in the same temporary cache tree (
tmpWpfc/<timestamp>/...). - The repeated error is always “No such file or directory”, meaning the target is already gone.
- The same cleanup flow appears to continue recursively after parent/child folders have already been removed.
scandir()is also being called on directories that no longer exist, which suggests missing existence checks before filesystem operations.
So the main issue seems to be that the cleanup routine does not safely handle cases where files/folders are already deleted by a previous step or by a concurrent request.
Could you please check whether the cleanup code around those lines should be hardened with guards such as:
file_exists()/is_file()beforeunlink()is_dir()beforescandir()/rmdir()- suppression or controlled handling of expected ENOENT cases
- protection against parallel cleanup on the same
tmpWpfcdirectory
At the moment this is generating a huge amount of warning noise in the logs.
In short: it looks like the plugin is trying to remove temporary cache entries multiple times, and the missing existence checks are producing excessive warnings.
Thank you.
You must be logged in to reply to this topic.