I am trying to port to google app engine modules, a previously long-running job ( running in 'backends' ) .
A sample module1.yaml is present below.
application: myuniqueapp
module: module1
version: 1
runtime: python27
api_version: 1
threadsafe: true
instance_class: F4_1G
automatic_scaling:
max_idle_instances: 1
handlers:
- url: /data
static_dir: data
application_readable: true
- url: /.*
script: app.application
The code to submit to this (from a front-end instance), via taskqueue is this:
taskqueue.add(url='/tasks/do_my_task',
target='1.module1')
This submits the right task without an issue. The task gets executed by the module1 as well.
But it gets killed by the 10th minute, with the DeadlineExceededError. This is a long running task and runs for longer than 10 minutes ( like how it used to work for 'backends' ).
What configuration change needs to be done, for the task executing in a module to be > 10 minutes ?
App Engine attempts to keep manual and basic scaling instances running indefinitely. However, at this time there is no guaranteed uptime for manual and basic scaling instances.
Google App Engine provides four possible runtime environments for applications, one for each of four programming languages: Java, Python, PHP, and Go. The environment you choose depends on the language and related technologies you want to use for developing the application.
10 minutes for HTTP requests and task queue tasks.
You simply need to choose manual or basic scaling for your module:
https://developers.google.com/appengine/docs/java/modules/#Java_Instance_scaling_and_class
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With