3

My Google App Engine application needs to run a lengthy calculation. Automatic scaling on my module returns DeadlineExceededError, so I tried switching to manual and basic scaling.

For basic scaling, I added this to my yaml file.

instance_class: B2
basic_scaling:
  max_instances: 5
  idle_timeout: 10m

But when I send a URL request to the module, my logs get flooded with 56:

/_ah/start 404
No handlers matched this URL.

Then eventually returns:

HTTPError: HTTP Error 503: Service Unavailable

For manual scaling, I added this to my yaml file:

instance_class: B2
manual_scaling:
    instances: 1

But when I send a URL request to the module, after a while I get:

HTTPError: HTTP Error 503: Service Unavailable

But nothing in the logs.

What am I missing? Do I need to put a handler for /_ah/start? I thought a 404 was acceptable to start the module.

4

2 回答 2

5

Figured it out. I had to add a handler to my module.

I added:

- url: /_ah/start
  script: colors.handler.app

to my handlers: and it worked.

于 2013-07-24T04:57:37.673 回答
0

Interesting. I just ran into this issue as well.

When an instance responds to the /_ah/start request with an HTTP status code of 200–299 or 404, it is considered to have successfully started and can handle additional requests. Otherwise, App Engine terminates the instance. Manual scaling instances are restarted immediately, while basic scaling instances are restarted only when needed for serving traffic.

于 2013-10-04T17:37:03.740 回答