sessions in memcache with redundant server
| From: | Sascha A. Müller | Date: | Tue, 27 Oct 2009 08:03:58 +0000 |
| Subject: | sessions in memcache with redundant server | ||
| Groups: | php.pecl.dev | ||
| Request: | Send a blank email to pecl-dev+get-6733@lists.php.net to get a copy of this message | ||
Hi all,
we are using memcache within php to store session but are worried if one of the memcache servers
would fail that we would loose half of our session. While diggin the net I stumbled upon this bug
report from late 2007 http://pecl.php.net/bugs/bug.php?id=11637.
Inside the bug report there is a proposal for configuration options for using redudant memcache to
store the sessions. Also the configuration options mentioned inside the thread seems to work (at
least the + when configuring session.save_path inside php.ini, the mentioned & does not) but the
sessions are not stored inside both memcache servers. I checked the content of the memcache servers
with the script from here http://livebookmark.net/memcachephp/memcachephp.zip
My questions now is if this feature ever got implemented and if where can I find some documentation?
As I only configured php sessions handling with the infos I got from the bug report maybe I just did
not do it right. For completness here are the relevent parts of the php.ini file and the
conf.d/memcache.ini file
memcache.ini
extension=memcache.so
[memcache]
memcache.dbpath="/var/lib/memcache"
memcache.maxreclevel=0
memcache.maxfiles=0
memcache.archivememlim=0
memcache.maxfilesize=0
memcache.maxratio=0
memcache.allow_failover = 1
memcache.session_redundancy = 2
php.ini extract
session.save_handler = memcache
session.save_path = "tcp://127.0.0.1:11211+tcp://127.0.0.1:11212"
The + at least does not give me an error when I do a session_start().
Thanks in advance and Best Regards
Sascha Müller