Re: [google-appengine] Re: max_backoff_seconds - working?

2010-12-16 Thread Nicholas Verne
Vlad,

Your case is a bit of an edge case for us. At the time your task is
dispatched, do you have any other tasks still in the queue scheduled
to execute within the next twenty seconds? If not, your queue is
considered empty and will next be checked for tasks to dispatch in
twenty seconds time. If, during this interval, your task that was
running now fails, the task's retry won't be able to run until after
this twenty seconds has elapsed.

If there were other tasks in the queue scheduled to execute during the
twenty seconds after your task's eta, you might find your task meeting
its 7 second retry backoff more precisely.

Nick Verne

On Thu, Dec 16, 2010 at 2:58 PM, vlad  wrote:
> Hi Nick,
>
> Task schedule delays (best effort) are expected but this is not the case.
> Take a look at the log excerpt below which shows a task with 6 reties.
> Retries are perfectly timed on flat 20sec back off schedule. In other words
> I have never seen task reties follow what I put in my queue.yaml. Instead
> they *always* do 20 sec backoff.
> Another fact that might help is this has not changed at all with SDK 1.4.0
> release. This picture was exactly the same before the release.
>
> My queue.yaml
>
> queue:
> - name: default
>   rate: 20/s
>   bucket_size: 100
>   retry_parameters:
>     task_age_limit: 120s
>     min_backoff_seconds: 1
>     max_backoff_seconds: 7
>
>
> 12-14 11:56PM 14.864 /_ah/queue/deferred 500 71ms 63cpu_ms 16api_cpu_ms 0kb
> AppEngine-Google; (+http://code.google.com/appengine)
>
> See details
>
> 0.1.0.2 - - [14/Dec/2010:23:56:14 -0800] "POST /_ah/queue/deferred HTTP/1.1"
> 500 124 "http://ace-poker.appspot.com/_ah/queue/deferred"; "AppEngine-Google;
> (+http://code.google.com/appengine)" "ace-poker.appspot.com" ms=71 cpu_ms=63
> api_cpu_ms=17 cpm_usd=0.001856 queue_name=default
> task_name=9640193529655285671
>
> I 12-14 11:56PM 14.867 X-Appengine-Taskretrycount:6,
> X-Appengine-Queuename:default, X-Appengine-Taskname:9640193529655285671,
> X-Appengine-Current-Namespace:
>
> I 12-14 11:56PM 14.868 running task: {'player':
> 'aglhY2UtcG9rZXJyDgsSBlBsYXllchj8szUM', 'action': 'force-fold', 'who':
> 'dealer', 'type': 'action', 'hand-snapshot': u'flop-50
>
> I 12-14 11:56PM 14.921
> Hand=aglhY2UtcG9rZXJyGQsSBVRhYmxlGPODOAwLEgRIYW5kGJ-SFAw, state=playing,
> table=Medes (aglhY2UtcG9rZXJyDQsSBVRhYmxlGPODOAw)
>
> I 12-14 11:56PM 14.921 pre-action-dealer (force-fold)
>
> 12-14 11:56PM 14.864 /_ah/queue/deferred 500 71ms 63cpu_ms 16api_cpu_ms 0kb
> AppEngine-Google; (+http://code.google.com/appengine)
>
> See details
>
> 0.1.0.2 - - [14/Dec/2010:23:56:14 -0800] "POST /_ah/queue/deferred HTTP/1.1"
> 500 124 "http://ace-poker.appspot.com/_ah/queue/deferred"; "AppEngine-Google;
> (+http://code.google.com/appengine)" "ace-poker.appspot.com" ms=71 cpu_ms=63
> api_cpu_ms=17 cpm_usd=0.001856 queue_name=default
> task_name=9640193529655285671
>
> I 12-14 11:56PM 14.867
>
> X-Appengine-Taskretrycount:6, X-Appengine-Queuename:default,
> X-Appengine-Taskname:9640193529655285671, X-Appengine-Current-Namespace:
>
> I 12-14 11:56PM 14.868
>
> running task: {'player': 'aglhY2UtcG9rZXJyDgsSBlBsYXllchj8szUM', 'action':
> 'force-fold', 'who': 'dealer', 'type': 'action', 'hand-snapshot':
> u'flop-50-chj8szUM', 'hand':
> 'aglhY2UtcG9rZXJyGQsSBVRhYmxlGPODOAwLEgRIYW5kGJ-SFAw'}
>
> I 12-14 11:56PM 14.921
>
> Hand=aglhY2UtcG9rZXJyGQsSBVRhYmxlGPODOAwLEgRIYW5kGJ-SFAw, state=playing,
> table=Medes (aglhY2UtcG9rZXJyDQsSBVRhYmxlGPODOAw)
>
> I 12-14 11:56PM 14.921
>
> pre-action-dealer (force-fold)
>
> I 12-14 11:56PM 14.921
>
> pre-action: (force-fold) pot=50 round=flop board=[u'Td', u'Ac', u'Ad']
> current_bet=0 next_to_act=0
> players:
>   aglhY2UtcG9rZXJyDgsSBlBsYXllchj8szUM: bet=0 total=10 acted=False
> in-game=True
>   aglhY2UtcG9rZXJyDgsSBlBsYXllchispDUM: bet=0 total=10 acted=False
> in-game=True
>
> I 12-14 11:56PM 14.928
>
> notify-multi: ['hjygzgM-33', 'hixwjgM-33', 'hiZyjgM-33', 'hiLhTUM-33',
> 'hispDUM-33', 'hj8szUM-33', 'bserver-33']
>
> I 12-14 11:56PM 14.928
>
>   {'pot': 50L, 'who': 'dealer', 'hand':
> 'aglhY2UtcG9rZXJyGQsSBVRhYmxlGPODOAwLEgRIYW5kGJ-SFAw', 'player':
> 'aglhY2UtcG9rZXJyDgsSBlBsYXllchj8szUM', 'action': 'force-fold', 'type':
> 'action', 'stack': 1685L, 'hand-snapshot': u'flop-50-chj8szUM'}
>
> D 12-14 11:56PM 14.928
>
> hand action: {'pot': 50L, 'who': 'dealer', 'hand':
> datastore_types.Key.from_path(u'Table', 918003L, u'Hand', 330015L,
> _app=u'ace-poker'), 'player': datastore_types.Key.from_path(u'Player',
> 875004L, _app=u'ace-poker'), 'action': 'force-fold', 'type': 'action',
> 'stack': 1685L, 'hand-snapshot': 'flop-50-chj8szUM'}
>
> I 12-14 11:56PM 14.928
>
> hand = aglhY2UtcG9rZXJyGQsSBVRhYmxlGPODOAwLEgRIYW5kGJ-SFAw, betting
> finished, round = flop
>
> I 12-14 11:56PM 14.929
>
> showdown among 4 players
>
> E 12-14 11:56PM 14.931
>
> datastore_types.Key.from_path(u'Player', 926001L, _app=u'ace-poker')
> Traceback (most recent call last):
>   File
> "/base/python_runtime/python_lib/version

Re: [google-appengine] Re: max_backoff_seconds - working?

2010-12-17 Thread vlad
Thanks Nick. That makes sense. Indeed, I have been running a single task 
chain which would result in at most 1 task being pending at a time.

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appeng...@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.