![]() |
Two memcached servers for sessions - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5) +--- Forum: General Help (https://forum.codeigniter.com/forumdisplay.php?fid=24) +--- Thread: Two memcached servers for sessions (/showthread.php?tid=78809) |
Two memcached servers for sessions - MichalSkoula - 03-13-2021 Hello, Im using latest CI3. I have started two memcached instances - 127.0.0.1:12345 and 127.0.0.1:12346 Now in my config.php I have: PHP Code: $config['sess_driver'] = 'memcached'; my php.ini: Code: memcached.sess_number_of_replicas = 2 Now when both of the memcached instances are on, it works. When I turn off the first and keep the second on, it works. But when I turn off the second and keep the first on, it does not work - it tries for 12 seconds and then I have this error: Message: session_start(): Failed to read session data: user (path: c:/wamp64/tmp) RE: Two memcached servers for sessions - MichalSkoula - 03-13-2021 PHP Code: array (size=2) this is dump from: PHP Code: var_dump($this->_memcached->getServerList ( )); RE: Two memcached servers for sessions - MichalSkoula - 03-14-2021 I see, memcached does not support replication. I should go with redis. |