php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #60105 Session failover not functioning
Submitted: 2011-10-20 17:11 UTC Modified: -
Votes:8
Avg. Score:4.8 ± 0.4
Reproduced:7 of 7 (100.0%)
Same Version:5 (71.4%)
Same OS:1 (14.3%)
From: mail at masse dot biz Assigned:
Status: Open Package: memcache (PECL)
PHP Version: 5.3.8 OS: FreeBSD 8.1-RELEASE
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2011-10-20 17:11 UTC] mail at masse dot biz
Description:
------------
I have tried this eight ways to Sunday.  I have created working test cases on multiple servers with different combinations of settings to try and figure out why the failover does not work.

We have php5.3.8, pecl-memcache-3.0.6, memcached-1.4.7 with repcached.

Upon session_start() a key is successfully created in memcache.  Repcached does replicate it over to the other server and can be verified by telnet.

When we simulate a failure, the session handler does not fail over to the next available server listed in the save_path.

Current configuration:

session.save_handler = memcache
session.save_path = "tcp://ip1:11211, tcp://ip2:11211"
memcache.allow_failover="1"
memcache.hash_strategy="consistent"
We have tried to get it work with and without the below ini settings in different combinations:
memcache.session_redundancy=2
memcache.redundancy=1


Test script:
---------------
<?php
session_start();

if(!isset($_SESSION['id'])) {
    echo "VAR NOT SET!\n<br>";
    $_SESSION['id']=rand();
}else {
    echo $_SESSION['id']."\n<br>";
}
?>


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2012-07-26 11:32 UTC] eliseo dot carrasco at funiber dot org
The same issue happens with:

Debian 6.0.5
libapache2-mod-php5 5.3.3-7+squeeze13
php5-memcache 3.0.4-4+squeeze1
memcached-1.2.8-repcached-2.2.1
 
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Tue Dec 10 16:01:24 2019 UTC