Appengine backend "DeadlineExceededError" error

65 views
Skip to first unread message

Vivek

unread,
Nov 5, 2012, 12:57:42 AM11/5/12
to google-a...@googlegroups.com

We have a script that takes some time to execute. We have scheduled a cron job and use backend to run the job.

Here's what the cron looks like:
url: /cron/my_job_name
target: mybackend
schedule: every 30 minutes from 06:00 to 12:00

The cron job runs correctly as expected. But when I hit the url: https://myappname.googleplex.com/cron/my_job_name I get a "DeadlineExceededError" when the job runs for more than 60 seconds.

I need to be able to hit the url directly for testing purposes. I don't want to change the cron schedule every time for testing.

Is there a way to run the backend by hitting the url?

Adding my app.yaml and backends.yaml

app.yaml
url: /cron/my_job_name
script: path/my_job_name.py
login: admin

backends.yaml
name: mybackend
class: B8
instances: 1
options: dynamic

Marcel Manz

unread,
Nov 6, 2012, 10:40:47 AM11/6/12
to google-a...@googlegroups.com
See: https://developers.google.com/appengine/docs/java/backends/overview#Addressing_Backends

A backend instance can be targeted with HTTP requests to http://[instance].[backend_name].[your_app_id].appspot.com, or at your application's custom domain. If you target a backend without targeting an instance using http://[backend_name].[your_app_id].appspot.com, App Engine selects the first available instance of the backend.

You can call your backend script by http://yourbackendname.yourappid.appspot.com/cron/your_job

Vinny P

unread,
Nov 6, 2012, 11:12:32 AM11/6/12
to google-a...@googlegroups.com
Keep in mind that backends are set to private by default; you have to be logged in as an administrator to hit a backend from a URL. 

Alternately, you can set the backend to public (options: dynamic, public in your yaml file) and then hit the backend from anywhere.
Reply all
Reply to author
Forward
0 new messages