-
Notifications
You must be signed in to change notification settings - Fork 114
Redis sessions #13
Comments
Redis works with PHP 7.
Why it works? Because PHP has native session handler in Redis. (You need the php-redis module, but you would want it anyway.) |
Maybe a bit early to close. It seems native phpredis doesn't support session locking which could cause serious issues in Magento, check phpredis/phpredis#37 I can't find any log mentioning that locking is implemented in php7-redis version :( Cm_RedisSession implements locking mechanism and it also has fallback to db sessions if Redis is unavailable, or socket fallback if phpredis is unavailable, so we need to fix it. Btw. it seems Cm_RedisSession + sockets (without native phpredis) is working on windows/php7, I am able to login. And I tested one ubuntu/php7/phpredis setup where it worked without problems, but it was earlier build of php7 and php7-redis, not the last one. I think we should wait for new official phpredis release for php7, there is working branch, but not release. |
Good find! Reopening issue. So, to conclude, we need someone to fix phpredis :-)
|
@icurdinj do you have steps to reproduce for I'm happy to dig in to resolve this wherever it's best mitigated, but I'm using PHP 7.0.2 and phpredis's master branch and I'm not having any issues. |
Ubuntu 15.10, using https://launchpad.net/~ondrej/+archive/ubuntu/php?field.series_filter=wily for PHP 7.0.2 and phpredis 2.2.7. So, the only difference I see is that you are you using phpredis master branch, instead of latest release. |
I misspoke, I'm using the php7 branch of phpredis. Version 2.2.7 doesn't have PHP 7 support, it's supported in the php7 branch and this isn't available via PECL yet - per phpredis/phpredis#692 Before looking into the separate locking issue maybe this is the cause of the crash? |
I can confirm that as of PHP 7.0.2 Cm_RedisSession is working as expected (for me I tested with phpredis on php7 branch) see also colinmollenhour/Cm_RedisSession#70 (comment) |
Time to close this issue. The only problem encountered, with phpredis module, seems to be fixed in their master branch, and even if you encounter that, there are a few viable workarounds. No need to code anything in this extension. |
Just so it's documented here: Redis sessions probably crash.
We now have a pretty good idea how to fix this (the same as db sessions), and will get around to it as soon as we have a Redis environment to test that.
Meanwhile, if someone else already did this, pull requests are always welcome.
The text was updated successfully, but these errors were encountered: