Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

App Engine Python module Basic and Manual scaling not working

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.

like image 852
Michael Johnston Avatar asked May 08 '26 21:05

Michael Johnston


1 Answers

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.

like image 79
Michael Johnston Avatar answered May 10 '26 11:05

Michael Johnston



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!