Jon, do you happen to have unit test code that reproduces this that I can plug in to an app? I'd like to reproduce this.
On Thu, Mar 4, 2010 at 1:31 PM, Jon Blower <jon.blo...@gmail.com> wrote: > 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 google-appengine-j...@googlegroups.com. > To unsubscribe from this group, send email to > google-appengine-java+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/google-appengine-java?hl=en. > > -- Ikai Lan Developer Programs Engineer, Google App Engine http://googleappengine.blogspot.com | http://twitter.com/app_engine -- 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 google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.