Open JanTvrdik opened 8 years ago
I have never experienced such a problem.
Similar bug for me, whole notice: PHP Notice: unserialize(): Error at offset 18 of 34 bytes in /project_dir/vendor/nette/caching/src/Caching/Storages/FileStorage.php:339 . It everytime occurs at the same page. Maybe some problematic string. I found this should be fixed by base64 encode/decode "hackfix" - davidwalsh blog with solution.
Could you post here/somewhere contents of the unserialized file? To confirm atomic access issue or serialize/unserialize bug.
Well, I don't know which file is the problem. It occurs approx. once a month and tracy log only notice row to error file without any other data.
And how do you solve the issue? Deleting some file? Or not?
Btw, I don't think that mentioned blog solution is right. IMHO, they have some DB store/fetch issue and base64() only hides that bug.
Every time "solved" by removing log file. When remove content of temp directory, no notice on problematic page created. Notice is created in random future time. Anyway, I just modified FileStorage in vendor for log variable $data on problematic page and when notice will be occurred, I will post it here. Hope it will be complete copyable content.
Couple of times per month I receive unserialize error ("Error at offset X of Y bytes") from RobotLoader which uses FileStorage. This suggests that FileStorage failed to write tha data properly. I alway delete the cache which solves the issue, obviously, but it is getting quite annoying so I've decided to finally open this issue.
Windows 10 x64, PHP 7.0.8 x64 NTS, FastCGI + Caddy