Hi,

I have a GAE-J application that involves requesting dynamically-
generated images.  The application has fairly high latency (~1s per
request).  I'm stress-testing the application using JMeter, hitting
GAE with four simultaneous threads, each looping through a fixed set
of requests.  I get a consistent pattern, in which the first twenty or
thirty requests succeed, then every subsequent request fails.  The
server log shows that the failures occur during a memcache put
operation:

"com.google.appengine.api.memcache.stdimpl.GCacheException: Policy
prevented put operation
        at com.google.appengine.api.memcache.stdimpl.GCache.put(GCache.java:
165)"

If I stop the stress test for a couple of minutes, then restart it I
get the same pattern: success for the first 20-30 requests, then this
failure thereafter.  It's not the same requests that fail each time.
Also, the data I'm storing in the memcache is always 1MB or less.  My
memcache set policy is the default of SET_ALWAYS.

Is there some policy restricting the number of memcache puts I can do
per second perhaps?  Or is there a thread safety issue?

Here are a few more details about my application.  I have stored high-
resolution images in the persistent store by breaking them up into
chunks of size 1MB or less.  I have layered memcache above the
persistent store.  So I have code that looks like this:

public byte[] requestChunk(String chunkId) {
   byte[] chunk = searchMemcache(chunkId);
   if (chunk != null) return chunk;
   chunk = searchPersistentStore(chunkId);
   if (chunk != null) {
      putChunkInMemcache(chunkId, chunk);  // *** This is where the
errors come from! ***
      return chunk;
   }
   return null;
}

It's the putChunkInMemcache() method that fails during the stress
test.

Any guidance much appreciated!
Jon

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.

Reply via email to