skip to Main Content

I am getting a lot of these errors in my App Engine Standard Environment Python 3 application. The application seems to initialize and to work fine: I can’t see any sort of failure during initialization.

How can I figure out the cause? Could it be ordinary instance scale-down despite what this log says?

 Start program failed: termination triggered by nginx exit

 [INFO] Shutting down: Master 
 Worker exiting (pid: 20)

 [INFO] Worker exiting (pid: 23)
 Handling signal: term

 Quitting on terminated signal

I see a number of these shut-down errors in a row, suggesting that multiple instances are shutting down. So, the last step from 1 to 0 instances is not the relevant one.

The app.yaml is as follows:

runtime: python39
service: iris3

env_variables:
  TOKENPS: 54

3

Answers


  1. Chosen as BEST ANSWER

    I tested a Hello World example and found that this is the ordinary log during instance scaledown.

    The log should be considered a bug. It clearly says that start -- i.e., initialization -- is failing, where in fact nothing is failing and this involves shutdown rather than startup.


  2. This is an expected behavior, the instances began to shut down in response to some events, like exceeding the number of idle instances and they are no longer processing requests.

    That log messages correspond to SIGTERM signals sended by the GAE environment to the app container. The full log messages represents the steps taken to terminate all processes and the instance

    Login or Signup to reply.
  3. Check if you return a status of 204 it can shut down your instance,
    It’s a kind of bug in gunicorn, you can see here

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search