-
-
Notifications
You must be signed in to change notification settings - Fork 453
Randomly getting the phpFastCacheIOException #614
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Hello, I don't know what to say, tests are all green as you can see: I may have a clue, but I need to see your cache code context :) Thanks |
As I have no possibility to create a test for that, I'm going to push a preventive fix that should logically fix your issue. Here's my clue: |
Fix will be available in the next release (around next week). |
Thank you so much! |
Since the v6 had no new release since march, I'm gonna release one immediately. |
Hey @Geolim4 , I am using the Latest release 6.1.3.. I am still seeing the error
here is the file created by phpfastcache however, I have given the full right 777 to the parent directories. I have checked the CacheManager.php and it has Let me know if this can be fixed. Thank you |
Are you sure that you updated the right composer ? Because I see that error in your stack:
But it is not matching that line 157 updated in v6: But you have updated composer in |
Aaah, I see. Good catch buddy. Let me update it under /web_services and I will get back to you if needed. Thank you |
So, the issue with new files being created with wrong permission is fixed in 6.1.3? |
It has to be as per ab15efd |
@hriziya Is it working now ? :) |
I have manually set the full permission to existing directories.. I did not see the error again, so it seems working.. |
I have faced this issue again on my another server where I have Ubuntu 18.04, PHP 7.4, nginx, and Do you think this could have happen due to multiple process try to access the same file (I have no idea about it though).. I can easily overcome it by hiding the warning message, but as this is beta site, I used to keep it ON. Let me know if I need to set any special settings? |
Nah it's your OS that clean up the temp directory, set a dedicated cache directory and the error will go away forever :) /tmp should be for a temporary usage ! |
That make sense. Thank you. |
I got the same issue in version 8.1.2 |
Check the ownership/chmod permission of your cache directory. The tests are passing without any issue recorded: |
The same issue I encountered was resolved by specifying the proper host-allowed cache directory path. I specified the path as "/home/yourusername/domains/yourdomain.com/public_html/yourproject/data/cache" where I'm using DirectAdmin as the host for the control panel, and this problem is now fixed. ✅ |
Configuration
I am using this since more than a year, and getting such permission exception once in a month or so.
It is completely random behavior and has no specific steps to duplicate it. Can anyone help with that?
I have checked the CacheManager class and the default setting is
'default_chmod' => 0777,
here are my doubts
"autoTmpFallback" = true
in settings?here is the detailed log of the exception message.
Fatal error: Uncaught phpFastCache\Exceptions\phpFastCacheIOException: PLEASE CHMOD /tmp/beta/Auto/Files/73/74 - 511 OR ANY WRITABLE PERMISSION! in /var/www/html/beta/web_services/vendor/phpfastcache/phpfastcache/src/phpFastCache/Core/Pool/IO/IOHelperTrait.php:157
Stack trace:
#0 /var/www/html/beta/web_services/vendor/phpfastcache/phpfastcache/src/phpFastCache/Drivers/Files/Driver.php(72): phpFastCache\Drivers\Files\Driver->getFilePath('all_types')
#1 var/www/html/beta/web_services/vendor/phpfastcache/phpfastcache/src/phpFastCache/Core/Pool/CacheItemPoolTrait.php(353): phpFastCache\Drivers\Files\Driver->driverWrite(Object(phpFastCache\Drivers\Files\Item))
#2 /var/www/html/beta/web_services/vendor/phpfastcache/phpfastcache/src/phpFastCache/Helper/Psr16Adapter.php(84): phpFastCache\Drivers\Files\Driver->save(Object(phpFastCache\Drivers\Files\Item))
#3 /var/www/html/beta/web_services/_HELPER.php(1257): phpFastCache\Helper\Psr16Adapter->set('all_types', Array, 1200)
#4 /var/www/html/beta/web_services/service.php(417): HELPER in /var/www/html/beta/web_services/vendor/phpfastcache/phpfastcache/src/phpFastCache/Core/Pool/IO/IOHelperTrait.php on line 157
The text was updated successfully, but these errors were encountered: