Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.
  • os: debian squeeze (up2date)
  • 2 apache mod php webserver
  • 2 memcache server

i have to apache mod_php nodes which use two memcache server for redundant session storage (used variant 3 from http://serverfault.com/a/165584).

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.hash_strategy=consistent
memcache.session_redundancy=3

php.ini

session.save_handler = memcache
session.save_path="tcp://192.168.0.11:11211?persistent=1&weight=1&timeout=1&retry_interval=15,tcp://192.168.0.19:11211?persistent=1&weight=1&timeout=1&retry_interval=15"

everything works fine using only one memcache server, it also works quite nice with two or two redundant server. the sessions are written to both servers (i can verify it with phpmemcache admin), but as soon as i kill one node (stop one memcache server) i get into trouble.

the memcache servers look like the are having one "master" server and one "2nd" server. there are less problems when i kill the 2nd server, but as soon as shut down the 1st memcache server (having the 2nd one up), apache error log gets filled with segmentation faults on each connection try.

i also tried memcache.session_redundancy=3 but i have the value 3 because of the bug https://bugs.php.net/bug.php?id=58585

ps. if you use firefox use: https://addons.mozilla.org/en-US/firefox/addon/its-all-text i just lost my question on pressing back after running into the "are you human" stuff of serverfault....

share|improve this question

1 Answer 1

I had the same error. You have to install a new memcache version. I had the 3.04 and it failed as you say, with 3.07 apache isn't crashing. I can stop one of my memcached servers and the second of them suports the failure, without apache segfaults.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.