mahtems at gmail.com
Thu May 24 00:57:38 UTC 2007
I've been having problems with memcached since I set it up and I think its
probably because I don't 100% understand it.
We have 20 php servers, all of with the same specs, each one with 4GB of RAM
and 1GB of that is for memcached.
Each has the same php scripts. Every single script starts with this:
memcache_pconnect which connects to the same IP, which is our first PHP
server. This is the same seever which is connected to by every server. Then
we have memcache_add_server for all of the other 19 php servers we have.
So for example:
$this->memcache_id = memcache_pconnect('22.214.171.124', 11211);
memcache_add_server($this->memcache_id, '126.96.36.199', 11212, false);
memcache_add_server($this->memcache_id, '188.8.131.52', 11211, false);
With that set up on all of the servers, memcached works like it should most
of the time. But theres the ocasional problems where data we deleted from
the cache still appears, even hours after it was deleted.
If we set it to persinstant connections, the whole thing stops working. They
don't fail, the processes stay alive, but memcached stops adding to getting
And if we make any edits to the connection information, the whole thing acts
crazy and I usually have to kill every process on every server, restart
apache on every server, start every memcached process again and then add the
memcached connect info at the top of the scripts again.
What I don't understand is, how does the API know which server to find the
And why does it act so strange when persistant connections are enabled? Is
it because theres 30 servers?
Thanks for your help
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the memcached