I have an app that works fine on my dev machine (osx, local memcached) but
when I move it to appengine it fails. I tracked it to memcache not storing
objects over about 3.5k.
Here is a little test that runs under express. It takes a length value
makes a buffers, sends it to memcache and tries to get it back. It works
fine locally up to the expected 1MB limit, however on appengine it fails at
around length 3600 +/- 200 (it varies, which is really odd). I've tried
several different memcache libs, they all fail the same way.
What am I missing?
//memcache test.
app.get('/mct/:len',function(req,res) {
var memcachedAddr = process.env.MEMCACHE_PORT_11211_TCP_ADDR || 'localhost';
var memcachedPort = process.env.MEMCACHE_PORT_11211_TCP_PORT || '11211';
var memcacheServer = memcachedAddr + ":" + memcachedPort;
var Memcached = require('memcached');
var client = new Memcached(memcacheServer);
var len = req.params.len * 1; //lazy cast to int
var text = new Array(len + 1).join( " " );
try {
client.set("testkey",text,600,function(err,val) {
client.get("testkey",function(err,data) {
if (data && data.length === text.length) {
res.send("OK at length " + text.length + " " +data.length);
} else {
res.send("Failed at " + text.length + " " );
}
});
})
} catch(e) {
res.send("Failed at " + text.length + " " + e.message);
}});
--
You received this message because you are subscribed to the Google Groups
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/google-appengine.
To view this discussion on the web visit
https://groups.google.com/d/msgid/google-appengine/2b9de800-4a66-45f3-9faa-311c834de30c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.