Skip to content
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

RedisStorage: Unsupported operand types #58

Open
wodCZ opened this issue Dec 22, 2015 · 4 comments
Open

RedisStorage: Unsupported operand types #58

wodCZ opened this issue Dec 22, 2015 · 4 comments

Comments

@wodCZ
Copy link

wodCZ commented Dec 22, 2015

On this line I sometimes get Fatal Error Unsupported operand types.

In debugger I see following values:

$key = 'Kdyby.Autowired.AutowireProperties 6c0ef3504d5a554fb419842d8047550c';

$data = 'a:7:{s:9:"webLoader";a:2:{s:5:"value";N;s:4:"type";s:29:"WebLoader\Nette\LoaderFactory";}s:14:"systemSettings";a:2:{s:5:"value";N;s:4:"type";s:28:"Libs\Settings\SystemSettings";}s:15:"companySettings";a:2:{s:5:"value";N;s:4:"type";s:29:"Libs\Settings\CompanySettings";}s:11:"webSettings";a:2:{s:5:"value";N;s:4:"type";s:25:"Libs\Settings\WebSettings";}s:12:"imageManager";a:2:{s:5:"value";N;s:4:"type";s:30:"Libs\System\Image\ImageManager";}s:12:"modalManager";a:2:{s:5:"value";N;s:4:"type";s:24:"Libs\Modals\ModalManager";}s:11:"menuFactory";a:2:{s:5:"value";N;s:4:"type";s:26:"DK\Menu\UI\IControlFactory";}}";';

$meta = 's:1102:"{"time":"0.67322700 1450782047","callbacks":[[["Nette\\Caching\\Cache","checkFile"],"\/home\/vagrant\/Code\/xxxxxxxxxxxxxxxx\/App\/Presenters\/BasePresenter.php",1450445442],[["Nette\\Caching\\Cache","checkFile"],"\/home\/vagrant\/Code\/xxxxxxxxxxxxxxxx\/App\/RealEstateModule\/Presenters\/ListPresenter.php",1448030539],[["Nette\\Caching\\Cache","checkFile"],"\/home\/vagrant\/Code\/xxxxxxxxxxxxxxxx\/temp\/cache\/Nette.Configurator\/Container_e92ce85e6e.php",1450781946]],"serialized":true}';

$storedValue = 's:1102:"{"time":"0.67322700 1450782047","callbacks":[[["Nette\\Caching\\Cache","checkFile"],"\/home\/vagrant\/Code\/xxxxxxxxxxxxxxxx\/App\/Presenters\/BasePresenter.php",1450445442],[["Nette\\Caching\\Cache","checkFile"],"\/home\/vagrant\/Code\/xxxxxxxxxxxxxxxx\/App\/RealEstateModule\/Presenters\/ListPresenter.php",1448030539],[["Nette\\Caching\\Cache","checkFile"],"\/home\/vagrant\/Code\/xxxxxxxxxxxxxxxx\/temp\/cache\/Nette.Configurator\/Container_e92ce85e6e.php",1450781946]],"serialized":true} a:7:{s:9:"webLoader";a:2:{s:5:"value";N;s:4:"type";s:29:"WebLoader\Nette\LoaderFactory";}s:14:"systemSettings";a:2:{s:5:"value";N;s:4:"type";s:28:"Libs\Settings\SystemSettings";}s:15:"companySettings";a:2:{s:5:"value";N;s:4:"type";s:29:"Libs\Settings\CompanySettings";}s:11:"webSettings";a:2:{s:5:"value";N;s:4:"type";s:25:"Libs\Settings\WebSettings";}s:12:"imageManager";a:2:{s:5:"value";N;s:4:"type";s:30:"Libs\System\Image\ImageManager";}s:12:"modalManager";a:2:{s:5:"value";N;s:4:"type";s:24:"Libs\Modals\ModalManager";}s:11:"menuFactory";a:2:{s:5:"value";N;s:4:"type";s:26:"DK\Menu\UI\IControlFactory";}}";'

Problem is with that $meta being serialized json string, which json_decode($meta, true) evaluates as null.

This happens about once or twice per week, clearing cache helps. I didn't find a way to reproduce this. As there is no production version yet, I can't tell whether it may be caused by another error or something.

@fprochazka
Copy link
Member

The meta looks like serialized json string. Weird. Never happened to me :-/

@DanielStejskal
Copy link

Hi, it happened today (2016-10-27 08-18-05) on my production. Looks like long recursive problem.

Error: Unsupported operand types in /app/vendor/kdyby/redis/src/Kdyby/Redis/RedisStorage.php:368 
caused by Error: Unsupported operand types in /app/vendor/kdyby/redis/src/Kdyby/Redis/RedisStorage.php:368 caused by Error: Unsupported operand types in /app/vendor/kdyby/redis/src/Kdyby/Redis/RedisStorage.php:368 caused by... and so on

@jancko
Copy link

jancko commented Dec 3, 2019

Hey , i'm encountering this error a lot in last version . Totally randomly cache value works for some time and after that the whole string become serialized string after that json_decode is working with something like this as $meta value s:557:\"{\"time\":\"0.61602400 1575376562\"} which cannot be decoded

@Spamercz
Copy link
Member

Spamercz commented Dec 5, 2019

Do you have high throughput application? What version of redis are you using? This is quite difficult issue to replicate, but it would be great help if someone could make failing test reproducing this behaviour.
It did occure for me sometimes but I'm not able to reproduce this in tests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants