php - Is it possible high availability with Redis Cluster when using it as session handler? -


we trying use redis cluster storing session data using last version of phpredis, 2.2.5, downloaded github repository 19 juin of 2015, configuring redis sessions handler in php.ini configuraiton file.

we have 6 instances, 3 masters , 3 slaves , have tested storing , reading session data works.

however if shutdown master following error shown our application:

fatal error: uncaught exception 'redisexception' message 'connection closed' in /users/ets01/lib/php/dein/class.psasession.php:64 stack trace: #0 /users/ets01/lib/php/dein/class.psasession.php(64): session_start() #1 /users/ets01/lib/php/dein/class.psapage.php(102): psasession->__construct() #2 /users/ets01/web/inc/class.app2page.php(11): psapage->__construct('b', 11) #3 /users/ets01/web/html/index.php(11): app2page->__construct() #4 {main} thrown in /users/ets01/lib/php/dein/class.psasession.php on line 64  fatal error: uncaught exception 'redisexception' message 'connection closed' in [no active file]:0 stack trace: #0 {main} thrown in [no active file] on line 0 

connection closed, , cluster not works to, connection redone instance.

does phpredis driver manage connections cluster? provides automatically chance of getting value cluster instance?

we resolved problems :-)

at moment of creating cluster have use server ip instead of 127.0.0.1

redis-trib.rb create --replicas 1 10.68.10.201:7001 10.68.10.201:7002 10.68.10.201:7003 10.68.10.201:7004 10.68.10.201:7005 10.68.10.201:7006 

now setting , getting values in cluster php script works.

also, using session handler had use 5.6 version of, previous versions have "segmentation fault" error.


Comments

Popular posts from this blog

How to connect android app to App engine -

gcc - MinGW's ld cannot perform PE operations on non PE output file -

php - display validation error message next to the textbox in codeigniter -