Hey Ian, During our maintenance periods, Memcache no longer goes down - we just flush it.
Our docs on handing maintenance periods is unfortunately out of date. Thanks for bringing this to my attention. I'll put this on my plate to document it. In the meantime, here is some sample code. You can use your IDE's autocomplete to explore this API: http://pastie.org/1284924 import com.google.appengine.api.capabilities.CapabilitiesService; import com.google.appengine.api.capabilities.CapabilitiesServiceFactory; import com.google.appengine.api.capabilities.Capability; import com.google.appengine.api.capabilities.CapabilityState; CapabilitiesService cs = CapabilitiesServiceFactory.getCapabilitiesService(); CapabilityState state = cs.getStatus(Capability.DATASTORE); Capability capability = state.getCapability(); -- Ikai Lan Developer Programs Engineer, Google App Engine Blogger: http://googleappengine.blogspot.com Reddit: http://www.reddit.com/r/appengine Twitter: http://twitter.com/app_engine On Tue, Nov 9, 2010 at 3:42 AM, Ian Marshall <[email protected]>wrote: > In the GAE/J documentation for "Gracefully Degrading During Scheduled > Maintenance" it states > > "Note: Because App Engine for Java sessions are backed by memcache and > the datastore, sessions are effectively disabled during read-only > periods. You must take this into account when designing your > application." > > My code for detecting datastore down-times failed during last > Saturday's scheduled down-time. It attempts to detect a down-time by > writing to the mem cache using a StrictErrorHandler, and responding to > any MemcacheServiceException raised to disable parts of my web site > which write to the datastore, but I got severe errors before this got > detected: > > com.google.apphosting.api.ApiProxy$CapabilityDisabledException: > The API call datastore_v3.Put() is temporarily unavailable. > > This could be my fault in many ways (perhaps the mem cache stayed up). > In particular, I suspect that my app's use of sessions is at fault. > The relevant fragment of my "appengine-web.xml" config is: > > <appengine-web-app xmlns="http://appengine.google.com/ns/1.0"> > ... > <sessions-enabled>true</sessions-enabled> > ... > </appengine-web-app> > > This may be a silly question, but in what ways can one anticipate, > detect and handle the disabling of sessions during a datastore down- > time period? > > -- > 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]<google-appengine-java%[email protected]> > . > For more options, visit this group at > http://groups.google.com/group/google-appengine-java?hl=en. > > -- 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.
