On Sat, May 17, 2014 at 7:23 AM, Malleswari < [email protected]> wrote:
> May I know the reason for running same process in multiple > instances. I too faced this in my application, but it was not happened at > the time of loading the application instead, it happened while task queue > was serving one request. The same request handled twice with different > instances at approximately same time (milliseconds difference is there). > The task which my task queue processing was, very sensitive information, > because of this happened, it resulted me great loss as duplication > happened. > > Kindly tell me what was the *reason *to run the same request with > two different instances and *how to avoid* this. I can say, it was not > happening all the time, but when it happens, so much duplication of data > occurred in my case. > It's always possible for a single task to run twice, so you need to write your code to avoid any data loss/corruption if that occurs. See https://developers.google.com/appengine/docs/python/taskqueue/overview-pushand scroll down to where it says: "*When implementing the code for tasks... it is important to consider whether the task is idempotent. App Engine's Task Queue API is designed to only invoke a given task once; however, it is possible in exceptional circumstances that a task may execute multiple times (such as in the unlikely case of major system failure)*". However, it's worth verifying whether or not it was actually the same task. Can you pull out the headers for both requests and look for *X-AppEngine-TaskName* and *X-AppEngine-TaskRetryCount* headers? Do the headers contain the same values? ----------------- -Vinny P Technology & Media Advisor Chicago, IL App Engine Code Samples: http://www.learntogoogleit.com -- 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 http://groups.google.com/group/google-appengine. For more options, visit https://groups.google.com/d/optout.
