-
-
Notifications
You must be signed in to change notification settings - Fork 452
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
Using the Files driver, the get function sometimes throws a warning that the file does not exist #782
Comments
Hello curious contributor !
|
Hello, This does not appears in tests I made to test under heavy I/O activity. Are you running concurrent scripts that works on the same directory ?
I don't want to introduce a new "file" check if it's not absolutely necessary because this would introduce a new "read" activity before file opening which would introduce a massive performance issue in some circumstances. Can you show me your implementation please ? Thanks you |
Yes indeed they are concurrent scripts hitting the same directory. I will try to manage this from my end then.
Thanks.
…On Jan 27, 2021, 11:49 AM +0200, Georges.L ***@***.***>, wrote:
Hello,
This does not appears in tests I made to test under heavy I/O activity.
Are you running concurrent scripts that works on the same directory ?
> Maybe before calling file_get_contents we should check if the file exists?
I don't want to introduce a new "file" check if it's not absolutely necessary because this would introduce a new "read" activity before file opening which would introduce a massive performance issue in some circumstances.
Can you show me your implementation please ?
Thanks you
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
Try enabling "preventCacheSlams" option before trying anything else: |
Ok thanks ! Will try this and keep you posted.
…On Jan 27, 2021, 3:20 PM +0200, Georges.L ***@***.***>, wrote:
Try enabling "preventCacheSlams" option before trying anything else:
https://github.com/PHPSocialNetwork/phpfastcache/wiki/%5BV4%CB%96%5D-Configuration-Options#global-options
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
Me too!
Does the preventCacheSlams help here too? Thanks |
I will try to fix this one too since this can be easily patched. |
Your both related issue should now be resolved. Use "dev-master" in composer if you can't wait the next release (around mid-February). Cheers, |
Hi ! Any new release soon ? I would prefer to use a stable release instead of dev-master. Thanks. |
Hello, Saturday or Sunday at least. Sorry for delay. |
Thank you ! |
Hi, Even with the latest release (8.0.6) the "failed to open stream" warning is still appearing sometimes when hitting the same cache. Can we suppress this warning by prepending @ before file_get_contents ?
|
Hi ! Can we expect a fix for this ? Any ideas other than suppressing the warning? Thanks. |
In my guess I think you have an issue on your server or something because I have many tests running on pfc, especially tests on Files drivers that write/delete a LOT of cache files in a couple of seconds and this bugs does not appears at all: https://travis-ci.com/github/PHPSocialNetwork/phpfastcache/jobs/526644470#L3855 And at this time I'm unable to reproduce this bug. Also, using the |
Configuration
Describe the bug
Very rarely the get() function throws the following warning :
Warning: file_get_contents(.../Files/ae/95/ae950e72f6d3c0329c84fe06797c6fb2.txt): failed to open stream: No such file or directory, .../vendor/phpfastcache/phpfastcache/lib/Phpfastcache/Core/Pool/IO/IOHelperTrait.php @ 294
Expected behavior
The text was updated successfully, but these errors were encountered: