Deferred tasks in flexible environment

85 views
Skip to first unread message

Randy Sugianto 「Yuku」

unread,
Sep 28, 2016, 1:41:56 PM9/28/16
to Google App Engine

Since I switched my App Engine app to a flexible environment, it seems that all tasks failed to run. I was surprised that all tasks failed. But when I open the logs, I got only this:

01:33:56.026POST500167 B4 msAppEngine-Google; (+http://code.google.com/appengine)/_ah/queue/deferred

The status code is 500, but when I expand it, there is only this information inside:

0.1.0.2 - - [29/Sep/2016:01:33:56 +0800] "POST /_ah/queue/deferred HTTP/1.1" 500 167 http://0.xxxxxxx.module-sync.xxxxxxxxx.appspot.com/_ah/background "AppEngine-Google; (+http://code.google.com/appengine)" "module-sync.xxxxxxxxxx.appspot.com" ms=4 cpu_ms=0 cpm_usd=1.8663e-8 loading_request=0 instance=- app_engine_release=1.9.45 trace_id=-
{
metadata: {…} 
protoPayload: {…} 
insertId: "2016-09-28|10:34:00.180396-07|10.106.31.139|1292268011" 
httpRequest: {…} 
operation: {…} 
}
There is no exception or stack trace or anything else that I usually see when I was using the standard environment.

How can I troubleshoot this? Why are my deferred tasks not run?

Adam (Cloud Platform Support)

unread,
Oct 2, 2016, 4:29:51 PM10/2/16
to Google App Engine
Could you post an example app.yaml that shows your configuration? Also, if you are using 'google.appengine.ext.deferred.defer' to spawn your tasks, have you tested using the App Engine Task Queue API directly?

Randy Sugianto 「Yuku」

unread,
Oct 3, 2016, 3:02:26 AM10/3/16
to Google App Engine

I already solved it.

This is because the flexible environment does not support

builtins:
- deferred: on

on app.yaml.

You should mention this on the migration document or emit an error when deploying. This is a really bad experience for those migrating with the lack of proper documentation on this.


--
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-appengi...@googlegroups.com.
To post to this group, send email to google-a...@googlegroups.com.
Visit this group at https://groups.google.com/group/google-appengine.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-appengine/03062645-dc70-4c82-9907-5bcb2098e67f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Alex Martelli

unread,
Oct 3, 2016, 1:06:34 PM10/3/16
to google-a...@googlegroups.com
On Sun, Oct 2, 2016 at 11:59 PM, Randy Sugianto <yuk...@gmail.com> wrote:

I already solved it.

This is because the flexible environment does not support

builtins:
- deferred: on

on app.yaml.

You should mention this on the migration document or emit an error when deploying. This is a really bad experience for those migrating with the lack of proper documentation on this.

Yes it is, and thanks for pointing it out -- investigating I see this had been reported (including workaround) almost a year ago in http://stackoverflow.com/questions/33968512/failed-to-import-google-appengine-ext-deferred-handler-py-in-google-app-engine , and -- my bad! -- I hadn't opened the internal bug needed to get it fixed (at least in the docs, better of course, if feasible, in the code).

I have opened the internal bug now -- thanks again.


Alex

 


On Mon, Oct 3, 2016, 04:30 'Adam (Cloud Platform Support)' via Google App Engine <google-appengine@googlegroups.com> wrote:
Could you post an example app.yaml that shows your configuration? Also, if you are using 'google.appengine.ext.deferred.defer' to spawn your tasks, have you tested using the App Engine Task Queue API directly?


On Wednesday, September 28, 2016 at 1:41:56 PM UTC-4, Randy Sugianto wrote:

Since I switched my App Engine app to a flexible environment, it seems that all tasks failed to run. I was surprised that all tasks failed. But when I open the logs, I got only this:

01:33:56.026POST500167 B4 msAppEngine-Google; (+http://code.google.com/appengine)/_ah/queue/deferred

The status code is 500, but when I expand it, there is only this information inside:

0.1.0.2 - - [29/Sep/2016:01:33:56 +0800] "POST /_ah/queue/deferred HTTP/1.1" 500 167 http://0.xxxxxxx.module-sync.xxxxxxxxx.appspot.com/_ah/background "AppEngine-Google; (+http://code.google.com/appengine)" "module-sync.xxxxxxxxxx.appspot.com" ms=4 cpu_ms=0 cpm_usd=1.8663e-8 loading_request=0 instance=- app_engine_release=1.9.45 trace_id=-
{
metadata: {…} 
protoPayload: {…} 
insertId: "2016-09-28|10:34:00.180396-07|10.106.31.139|1292268011" 
httpRequest: {…} 
operation: {…} 
}
There is no exception or stack trace or anything else that I usually see when I was using the standard environment.

How can I troubleshoot this? Why are my deferred tasks not run?

--
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+unsubscribe@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.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+unsubscribe@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages