Hi, I wrote a simple servlet to count application instances GAE
allocates to serve my application. Here is the code:
public class ApplicationInstancesCounterServlet extends HttpServlet {
private static MemcacheService memcacheService;
@Override
public void init() throws ServletException {
super.init();
memcacheService = MemcacheServiceFactory.getMemcacheService();
memcacheService.increment(ApplicationInstancesCounterServlet.class.getName(),
1L, 0L);
}
@Override
public void destroy() {
memcacheService.increment(ApplicationInstancesCounterServlet.class.getName(),
-1L, 0L);
super.destroy();
}
}
But what I see after ~12 hours is value 222.
Which, I think, number of application starts (new instance created
every 3 minutes), but seems the destroy method never called.
Can I know somehow that app instance is shutting down?
--
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.