title: App engine 404 Error for readiness check even with increased app_start_timeout_sec
body: <p>First off, I would like to state that I have scoured SO for a solution, yet nothing worked for me...</p>
  <p>I am trying to deploy a flask server on App engine, yet I always get a 404 Error with <code>/readiness_check failReason:&quot;null&quot;</code></p>
  <p>This is my app.yaml (yes, I did increase the <code>app_start_timeout_sec</code>)</p>
  <pre><code>    # yaml config for custom environment that uses docker
      runtime: custom
      env: flex
      service: test-appengine
      # change readiness check ; 
      # rediness failure leads to 502 Error
      readiness_check:
        path: &quot;/readiness_check&quot;
        check_interval_sec: 5
        timeout_sec: 4
        failure_threshold: 2
        success_threshold: 2
        app_start_timeout_sec: 1800
  </code></pre>
  <p>And this is my <code>Dockerfile</code>:</p>
  <pre><code># Use the official Python image.
  # https://hub.docker.com/_/python
  FROM python:3.8-buster
  
  # Install Python dependencies.
  COPY requirements.txt requirements.txt
  RUN pip install -r requirements.txt
  
  # Copy local code to the container image.
  ENV APP_HOME /app
  WORKDIR $APP_HOME
  COPY . .
  
  # expose port 8080 for app engine
  EXPOSE 8080
  
  # Run the web service on container startup. Here we use the gunicorn
  # webserver, with one worker process and 8 threads.
  # For environments with multiple CPU cores, increase the number of workers
  # to be equal to the cores available.
  
  # CMD exec gunicorn --bind :$PORT --workers 1 --threads 8 main:app
  CMD [&quot;gunicorn&quot;, &quot;main:app&quot;, &quot;-b&quot;, &quot;:8080&quot;, &quot;--timeout&quot;, &quot;300&quot;]
  </code></pre>
  <p>Finally, my <code>main.py</code> contains a very basic route, for the sake of the argument :</p>
  <pre><code>from flask import Flask
  
  
  app = Flask(__name__)
  
  
  @app.route(&quot;/&quot;)
  def return_hello():
      return &quot;Hello!&quot;
  </code></pre>
  <p>Could you please let me know what I'm doing wrong? Have been battling this issue for days now ... Thank you !</p>