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: 2021-03-25 16:35 UTC
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: cmb (profile)
Status: Closed Package: memcache (PECL)
PHP Version: 5.3.8 OS: FreeBSD 8.1-RELEASE
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: mail at masse dot biz
New email:
PHP Version: OS:

 

 [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

Pull Requests

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
 [2021-03-25 16:35 UTC] cmb@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: cmb
 [2021-03-25 16:35 UTC] cmb@php.net
The official bug tracker for PECL/memcache is now at
<https://github.com/websupport-sk/pecl-memcache/issues>.

So, if this is still an issue with either of the current memcache
versions (4 or 8), please file an issue there.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Nov 23 07:01:29 2024 UTC