SMF Development > Bug Reports
Cache Error: failed to open stream
(1/1)
InfoStrides:
I occasionally receive these error messages when viewing my pages. I don't know what could have been causing them. Please help!
--- Quote ---Warning: require(/home/xxxxxxx/public_html/cache/data_557435de69e5934aa0062731f5973da8-SMF-modSettings.php) [function.require]: failed to open stream: No such file or directory in /home/xxxxxxx/public_html/Sources/Load.php on line 2820
Fatal error: require() [function.require]: Failed opening required '/home/xxxxxxx/public_html/cache/data_557435de69e5934aa0062731f5973da8-SMF-modSettings.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/xxxxxx/public_html/Sources/Load.php on line 2820
--- End quote ---
emanuele:
The bug is this one.
I remember Spuds did something for 2.1, but at the moment I don't have the code at hand...
Spuds:
Unfortunately I have not done anything on this one :( The changes we made were to address a couple of issues during the writing of the file cache files.
This error is the cache file has been removed between the time the file is checked to exist (or really the stat cache is updated) and its actual loading, bit of a race condition or condition caused by how the OS/ filesystem interact with the stat cache (forked processes, cloud FS, etc) ... just some latency that is long enough for the script to end up using stale stat cache info that *should* have be cleared with the unlink.
So one branch of the script has been given the OK to load a cache file, found it was old and is in the process or removing it, and the other branch is told the file still exists (maybe it does, or maybe the stat cache has not been updated) so it goes to require it and poof its gone.
Not sure a clearstatcache before the filecheck would help, nor how of much performance hit that my be given its the cache. Could also consider changing to @include vs require since we have a check for the validity of the data that loaded. That would stop the fatal error but not fix the issue. Not sure the issue is even fixable at the script level, so dealing with it may be the proper path.
Navigation
[0] Message Index
Go to full version