App Engine Go Program deadline exceeded error

80 views
Skip to first unread message

Dave Greenly

unread,
Dec 23, 2015, 1:08:46 PM12/23/15
to Google App Engine
We have a Go program running in an App Engine which receives an email and then does some processing.

After about 100 seconds, our  program stops because we get the following error:
  1. Process terminated because the request deadline was exceeded. (Error code 123)


  2. I did some research and found this is a deadline so resources are not consumed for an infinite loop or some other bad situation.

My  question is, how do I respond with a "success" so that I don't get the deadline exceeded, or, do I have to  increase my  deadline time? If so, where/how  do I do that.

What is the best approach for  an App Engine.

Thanks
Dave

A. Kong

unread,
Dec 23, 2015, 9:13:01 PM12/23/15
to Google App Engine
You can consider to push the email processing tasks into a task queue https://cloud.google.com/appengine/docs/go/taskqueue/ 
Message has been deleted
Message has been deleted

Adam (Cloud Platform Support)

unread,
Dec 23, 2015, 10:18:43 PM12/23/15
to Google App Engine
If you are using automatic scaling (the default) on App Engine, requests are limited to a maximum of 60 seconds. This is because these instances are optimized for short lived user requests. 

If you need a longer timeout you can 1) use a task queue as A. Kong suggested which can run for up to 10 minutes or 2) switch to manual scaling which can run any kind of request for up to 24 hours. Probably in your case you want to use a task queue, since you can just kick off the task and return success to the user immediately without waiting for processing to finish first.
Reply all
Reply to author
Forward
0 new messages