Any ideas?
Update – it seems like I get this error when manually clearing the cache, but I can’t recreate it all of the time.
Thank you for the bug report. I believe that I’ve found the reason this is occasionally occurring. I’ve opened a bug report and will get this fixed for the next release: https://github.com/websharks/quick-cache/issues/273
Looking at the error message a second time, I noticed a line that said “failed to open stream: Stale NFS file handle”. Can you confirm that your hosting environment is running an NFS (Network File System)?
I have heard of issues with writing files to disk in such a hosting environment, so while I do more research I wanted to confirm with you that you’re actually running such a thing. π
Also, do you mind sharing what web host you’re using?
Hi Raam – I’m using GoDaddy hosting. I called and asked about NFS, and they said my hosting environment is not running NFS.
Fortunately I haven’t had this error occur in a couple of days.
Pete
Thanks for the info, Pete. I still suspect not using atomic file creation might be to blame here (see the GitHub issue for details). I’ll fix that with the next release and hopefully that will resolve your issue as well.
No problem Raam –
Unfortunately I had another problem today, and am not sure if it’s related or not. This time I’m pretty sure I did not manually clear the cache. I realized that my wp-content/cache/ permissions were set (or possibly reset) to 705, so I changed it to be 755 now. I do have the experimental HTML compression enabled, and have all of the options set to ‘Yes’.
[15-Aug-2014 12:08:37 UTC] PHP Warning: mkdir() [<a href='function.mkdir'>function.mkdir</a>]: File exists in /html/wp-content/plugins/quick-cache-pro/submodules/htmlc/html-compressor/includes/core.php on line 2080
[15-Aug-2014 12:08:37 UTC] PHP Fatal error: Uncaught exception 'Exception' with message 'Cache directory not readable/writable: <code>/html/wp-content/cache/quick-cache/htmlc/private</code>. Failed on <code>/html/wp-content/cache/quick-cache/htmlc/private/www-skipthedrive-com/8/c/f/e/a</code>.' in /html/wp-content/plugins/quick-cache-pro/submodules/htmlc/html-compressor/includes/core.php:2085
Stack trace:
#0 /html/wp-content/plugins/quick-cache-pro/submodules/htmlc/html-compressor/includes/core.php(530): websharks\html_compressor\core->cache_dir('private', '8cfea1ba399d8fd...')
#1 /html/wp-content/plugins/quick-cache-pro/submodules/htmlc/html-compressor/includes/core.php(356): websharks\html_compressor\core->compile_css_tag_frags_into_parts(Array)
#2 /html/wp-content/plugins/quick-cache-pro/submodules/htmlc/html-compressor/includes/core.php(285): websharks\html_compressor\core->maybe_compress_combine_head_body_css('<!doctype h in /html/wp-content/plugins/quick-cache-pro/submodules/htmlc/html-compressor/includes/core.php on line 2085
The “Cache directory not readable/writable” error you’re seeing there was almost certainly caused by improper permissions on the cache directory. You might want to check with your web host and ask them why new files/directories might be losing the permissions you’re setting.
Agreed. It’s possible it was never correctly set to begin with. I’ll keep an eye on it.
Pete
Hey Raam – I realized that when I set my permissions on my cache directory to 755, I didn’t set it to recurse into subdirectories. Should I set it to recurse to subdirectories as well? What about the permissions on files?
I recommend clearing the cache (or manually deleting everything in wp-content/cache/quick-cache/ then resetting Quick Cache (Dashboard β Quick Cache β Plugin Options β Restore), and then making sure that `wp-content/cache/quick-cache/ is writable. That way everything inside, when it’s created by Quick Cache, should be created with the correct permissions.
If that doesn’t happen, and the permissions of the sub-directories continue to be wrong, you’ll need to contact your web host and ask them what’s going on.
Sounds good – I’ll export my options first.
Apparently GoDaddy sets all folder permissions to be 705 and all file permissions to be 604 by default . Should I recursively change them to be 755 & 644, respectively?
Should I recursively change them to be 755 & 644, respectively?
That’s really a question for GoDaddy, as it will depend on the server setup (which user runs the web server, etc.). All Quick Cache needs to operate correctly is to have write access to the cache directory. I recommend asking GoDaddy support what they recommend.