Re: [google-appengine] Stange log (twice start with two successive requests)

2014-05-18 Thread Vinny P
On Sat, May 17, 2014 at 7:23 AM, Malleswari 
malleswari.srinivasa...@a-cti.com 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 google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at http://groups.google.com/group/google-appengine.
For more options, visit https://groups.google.com/d/optout.


Re: [google-appengine] Stange log (twice start with two successive requests)

2014-05-17 Thread Malleswari
Hi, 
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.

 One thing I have observed is, one request was running say,  
/tasks/procesInfo , after sometime, the same process,  /tasks/procesInfo 
was running in different instance and these two are parallelly running.  Please 
help me. 

Thanks,
Malleswari.




-- 
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 google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at http://groups.google.com/group/google-appengine.
For more options, visit https://groups.google.com/d/optout.


Re: [google-appengine] Stange log (twice start with two successive requests)

2014-05-17 Thread timh
Tasks need to be written so that they are idempotent (ie can be run again 
at any point without changing the result).  I don't know why you task is 
being run twice,
but this is always a possible but unlikely outcome so they need to be able 
to deal with this possibility.

T

On Saturday, May 17, 2014 8:23:56 PM UTC+8, Malleswari Srinivasarao wrote:

 Hi, 
 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.

  One thing I have observed is, one request was running say, 
  /tasks/procesInfo , after sometime, the same process, 
  /tasks/procesInfo was running in different instance and these two are 
 parallelly running.  Please help me. 

 Thanks,
 Malleswari.






-- 
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 google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at http://groups.google.com/group/google-appengine.
For more options, visit https://groups.google.com/d/optout.


[google-appengine] Stange log (twice start with two successive requests)

2013-10-21 Thread sdnetwork
Hi,

since yesterday i get this kind of log :

[LOG]
*2013-10-17 20:59:03.124 /myurl 200 21361ms 0kb Mozilla/5.0 (BB10; Kbd) 
AppleWebKit/537.10+ (KHTML, like Gecko) Version/10.1.0.4633 Mobile 
Safari/537.10+*
I 2013-10-17 20:58:49.801 javax.servlet.ServletContext log: Initializing 
Spring root WebApplicationContext
W 2013-10-17 20:58:49.808 [s~myapp/1.370952269949752985].stderr: 
log4j:WARN No appenders could be found for logger 
(org.springframework.web.context.ContextLoader).
W 2013-10-17 20:58:49.809 [s~myapp/1.370952269949752985].stderr: 
log4j:WARN Please initialize the log4j system properly.
I 2013-10-17 20:58:53.701 javax.servlet.ServletContext log: Initializing 
Spring FrameworkServlet 'appServlet'
I 2013-10-17 20:59:03.055 This request caused a new process to be started 
for your application, and thus caused your application code to be loaded 
for the first time. This requ
*2013-10-17 20:58:58.115 /myurl 200 21677ms 0kb Mozilla/5.0 (BB10; Kbd) 
AppleWebKit/537.10+ (KHTML, like Gecko) Version/10.1.0.4633 Mobile 
Safari/537.10+*
I 2013-10-17 20:58:44.424 javax.servlet.ServletContext log: Initializing 
Spring root WebApplicationContext
W 2013-10-17 20:58:44.500 [s~myapp/1.370952269949752985].stderr: 
log4j:WARN No appenders could be found for logger 
(org.springframework.web.context.ContextLoader).
W 2013-10-17 20:58:44.500 [s~myapp/1.370952269949752985].stderr: 
log4j:WARN Please initialize the log4j system properly.
I 2013-10-17 20:58:48.334 javax.servlet.ServletContext log: Initializing 
Spring FrameworkServlet 'appServlet'
I 2013-10-17 20:58:58.114 This request caused a new process to be started 
for your application, and thus caused your application code to be loaded 
for the first time. This requ
[/LOG]

as you can see it seems that the application is loaded twice in two 
requests.

somebody could explain me ?

-- 
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 google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at http://groups.google.com/group/google-appengine.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [google-appengine] Stange log (twice start with two successive requests)

2013-10-21 Thread Vinny P
On Fri, Oct 18, 2013 at 3:50 AM, sdnetw...@gmail.com wrote:

 as you can see it seems that the application is loaded twice in two
 requests.



It's possible that the application loading is taking place within two
different instances. Can you open up the logs details and check the
instance property? If the instance names are different, then they are two
different instances and this is nothing to worry about.


-
-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 google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at http://groups.google.com/group/google-appengine.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [google-appengine] Stange log (twice start with two successive requests)

2013-10-21 Thread sdnetwork
ok thanks there are two differents instance name.

Le mardi 22 octobre 2013 05:19:32 UTC+2, Vinny P a écrit :

 On Fri, Oct 18, 2013 at 3:50 AM, sdne...@gmail.com javascript: wrote:

 as you can see it seems that the application is loaded twice in two 
 requests.



 It's possible that the application loading is taking place within two 
 different instances. Can you open up the logs details and check the 
 instance property? If the instance names are different, then they are two 
 different instances and this is nothing to worry about.
   
  
 -
 -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 google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at http://groups.google.com/group/google-appengine.
For more options, visit https://groups.google.com/groups/opt_out.