0

I have an application written in php. Until now, it hasn't been easy but it does the job. But now I have a problem: my script might need more than 10 mins to complete.

At the begining I was stuck with the 60 secs limit. Then I learned about "Tasks Push" and now I can make it run for 10 mins straight. I even "split" my code into pieces so every stage can have 10 mins to complete. But now I want even more and I've tried the "modules" approach but I just mess it up and almost cripple my app entireley.

Now I'm back to no-modules, using Tasks, with the code in stages but I'm wondering if there is a way I can run a script (in php) for more than 10 mins. I'm willing to try the "modules" approach again.

Any ideas? suggestions?

Harshal Patil
  • 6,659
  • 8
  • 41
  • 57
  • 1
    try modules again? I'm honestly unclear on your problem. You say "I know modules can make my app run more than 10 minutes, but can't get them to run.... any suggestions?". You seem to know your solution. Work on transferring everything on modules.... while you do so, if you have a problem with modules, ask another question pinpointing your issue :) – Patrice Feb 10 '15 at 20:30
  • Using Modules is the right approach - if you can describe in what way you cannot get modules to work, along with relevant `app.yaml`, etc, you might get some useful pointers. – tx802 Feb 11 '15 at 12:32
  • I tried using modules. My approach is to have a webpage to trigger a task, and this task should be running in an specific module. So far, so good. The problem comes when the task gets "stuck": it can't initialize the module and I get a bunch of "/_ah/start" logs for that module, all of them with the message "No handlers matched this URL". It is frustrating. For the moment I found another approach and it is to concatenate tasks: every 8 mins and if the stage hasn't finished the processing, it will trigger the task for the same stage again. Over and over until it gets done. It works. – Alberto Alexander Rodriguez Feb 11 '15 at 21:32
  • If your module is not auto scaling (e.g. Basic scaling), you might find you need to specify a handler for `/_ah/start` in your `app.yaml`. This worked for me in eliminating the 'No handlers...' error. [This](http://stackoverflow.com/questions/17822721/app-engine-python-module-basic-and-manual-scaling-not-working) may help. – tx802 Feb 12 '15 at 08:11

1 Answers1

1

Manual scaling modules will allow tasks to run for up to 24 hours

Tom
  • 1,563
  • 12
  • 12