Note that there are some explanatory texts on larger screens.

plurals
  1. POGoogle App Engine push tasks targeting backends not executing on production server
    primarykey
    data
    text
    <p>I have a really strange problem with the push task queue on backends on <em>production</em> server.</p> <p>I have some simple tasks which will write some log messages and a few NDB entities. When they are running on <em>backends</em>, they just "go away" silently. There are only single lines in the backend log saying the POST method for these tasks has been called, but all other things that would indicate the task being executed (<em>e.g. log messages written by the task, data store operations, etc.</em>) are nowhere to be seen. </p> <p>I tried to monitor the task queue from the console as the tasks run, and I see that almost all the tasks run through without retries. And yet they just don't look like they ever ran at all. If I move them off the backend, they all run normally (<em>log entries, ndb</em>), provided they can finish within the 10min deadline. However, on development server, they all run normally regardless of whether they are on backend or not. I'm really puzzled as to why these tasks would behave this way.</p> <p>I have a task handler that does something like this:</p> <pre><code>class MyTask(webapp2.RequestHandler): def post(self): _do_some_computation_ logging.info("some log message") some_ndb_entity = _some_thing_ some_ndb_entity.put() </code></pre> <p>And depending on the estimated run time for each of the task of such type (MyTask), I will decide whether to target it to a backend or not. </p> <pre><code>if big_task: taskqueue.add(url = '/task/mytask', queue_name = 'queue-for-backend', params = {key: value}, target = 'my-backend') else: taskqueue.add(url = '/task/mytask', queue_name = 'queue-regular', params = {key: value}) </code></pre> <p>I have configured the two queues with different parameters with the backend one having a smaller number of max_concurrent_requests, so I don't really see "<em>503 Instance Unavailable</em>" errors for those tasks on backends. So my problem is, I see those tasks run through on backends without error, but I don't see the log messages they would have written, nor do I see those ndb entities they would have put into the datastore. And these behaviors only happen on production server. </p> <p>I'm really clueless about this. I will greatly appreciate any help or advice, thanks in advance.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload