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.

I have been using repcached (memcached-1.2.8-repcached-2.2)to store php sessions in order to have a highly available memcached. Everything runs perfect, I can restart a daemon without losing sessions.

However if I reboot a server the repcached daemon does not sync to the unrebooted repcached daemon, basically they become out of sync and I would have to restart the unrebooted repcached before they would start syncing again. Even if I leave the newly booted server for hours it won't sync.

Any idea on why would this happen? Am I missing a configuration? This is the daemon config:

/usr/local/bin/memcached -m 512 -p 11211 -u root -P /var/run/memcachedrep.pid -d -x 10.60.216.196

share|improve this question
    
I seem to end up saying this a lot, but memcache is not designed to be highly avaliable! If it needs to still exist for the duration of the timeout, don't store it in memcache. If your PHP sessions are important, don't use memcache for them. If you get a sudden spike in traffic it's possible your memcache memory will fill up and start evicting old sessions very quickly, screwing up the site for everyone. –  sam Feb 5 '12 at 14:11
    
serverfault.com/a/336592/59925 –  quanta Mar 5 '13 at 3:12

Your Answer

 
discard

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

Browse other questions tagged or ask your own question.