0

I had referred different documentations and few questions that state the use of modules for running long running tasks on Google App Engine. What if my application consists of only one default project which requires a long time to execute and I want to run it on a backend instance?

Due to some reason, it won't be possible for me to convert my existing application into "Modules".

Please suggest.

Karan Tongay
  • 197
  • 1
  • 17
  • Did you try configuring manual or basic scaling for your default module? As that's what dictates long running tasks ability. http://stackoverflow.com/questions/39481769/how-to-use-modules-in-google-app-engine-and-add-a-target-to-them-using-task-queu – Dan Cornilescu Sep 16 '16 at 03:06
  • Yes, I had configured the scaling option in the queue.xml file. I have used Manual scaling with 5 instances. Also in my Web.xml I have used instance class as F4_1G. Is the problem because of instance class, as F4_1G can only be used with auto scaling? – Karan Tongay Sep 16 '16 at 04:03
  • I didn't find any such restrictions in the docs. I was going to ask a question about it, but I couldn't quite formulate it properly :) So with F4_1G do you see the 10 min limit being hit? Maybe try B4_1G as well? – Dan Cornilescu Sep 16 '16 at 04:09
  • Hi, :) I too didn't find in docs but get the following exception while deploying: Unable to update app: Error posting to URL: 400 Bad Request Instance class F4_1G is only allowed with the 'automatic' scaling value. – Karan Tongay Sep 16 '16 at 05:49
  • Hi, thanks for your response @DanCornilescu, I again tried setting B4_1G as instance class without any target module, the task executed completely for 6 hours and the desired result was achieved... Thanks...! :) – Karan Tongay Sep 16 '16 at 17:48
  • Glad to hear. I'll make it an answer then. Happy coding. – Dan Cornilescu Sep 16 '16 at 18:18

1 Answers1

1

What allows long running tasks for a module (default or not) is the module's scaling being set to manual or basic. Details in my answer to your other question: How to use Modules in Google App Engine and add a target to them using Task Queue (Java)?

So just configure your default module for one of these scaling options and set its instance class to one of the B classes (B4_1G for example). As you observed you can't use an F class in this case since F classes are only allowed for modules configured for automatic scaling.

Community
  • 1
  • 1
Dan Cornilescu
  • 39,470
  • 12
  • 57
  • 97