I have been working in trying to optimize a webservice that is required to return somewhat quickly (less than 1 second) and is required to maintain a high load of requests (greater than 1000/second). We are using memcached as a way to store objects “in memory”. It seems we are getting a large number of timeout errors from memcache.
[Thu Jul 23 22:59:42 2009] [error] [client 123.456.789.10] PHP Warning: Memcache::connect() [memcache.connect]: Can’t connect to 127.0.0.1:11211, Connection timed out (110)
So, on to the questions.
-
Is a good use of memcache to store objects in memory that are time consuming to create? Would APC be a better location for these objects? The number of reads and
-
Are there common pitfalls that I am overlooking in setting up memcache to work more efficiently?
Thanks for any help, I am somewhat new to working with memcache, and I think there is something I am missing.
To answer your first point :
One thing to about APC : if you use it for it’s opcode cache ability (you should), make sure you configure it to have enough RAM for opcode+cache (so that it doesn’t run out of memory for opcode cache, which would be bad)
If you need more (specific) help with memcached and don’t get much help here, there is a mailing-list, which is sometimes quite active ; maybe trying there could be useful.