If you locate and inspect the deferred.py of the sdk files, it's actually a pretty simple and brilliant routine
When a task overflows the taskqueue size limit, it puts a _DeferredTaskEntity to the db to utilize it for storage
My Problem:
I see 30-40 failed defer tasks at production (out of a burst operation that spanned 100.000's of tasks)
They fail with: "X-Appengine-Taskretrycount:1, X-Appengine-Taskretryreason:Instance Unavailable"
The exception is a PermanentTaskFailure from run_from_datastore
Does this mean that the tasks actually executed before, but faultily re-triggered, and threw PermanentTaskFailure's because the previous execution deleted the _DeferredTaskEntity entity?
(I'm trying to pinpoint the cause and the trigger so it doesn't happen again, since these exceptions all happened once and have a low count, I'm guessing this is a very edge behaviour)
If this is the case, they would probably cause a silent re-execution of the task, if the db entity / overflow scenario wasn't used