Home > Enterprise >  Simple static webpage deployment on app engine standard throwing errors suddenly
Simple static webpage deployment on app engine standard throwing errors suddenly

Time:11-20

I've been hosting my static site via an google app engine standard python setup for years without a problem. Today I started seeing the error below. Note: there used to be a page on GCP explaining how to host a static page using python GAE standard, but I can't find it now. Is it maybe the case where now it's recommended to use a bucket instead?

gunicorn.errors.HaltServer
Traceback (most recent call last): File "/layers/google.python.pip/pip/bin/gunicorn", line 8, in sys.exit(run()) File "/layers/google.python.pip/pip/lib/python3.8/site-packages/gunicorn/app/wsgiapp.py", line 58, in run WSGIApplication("%(prog)s [OPTIONS] [APP_MODULE]").run() File "/layers/google.python.pip/pip/lib/python3.8/site-packages/gunicorn/app/base.py", line 228, in run super().run() File "/layers/google.python.pip/pip/lib/python3.8/site-packages/gunicorn/app/base.py", line 72, in run Arbiter(self).run() File "/layers/google.python.pip/pip/lib/python3.8/site-packages/gunicorn/arbiter.py", line 229, in run self.halt(reason=inst.reason, exit_status=inst.exit_status) File "/layers/google.python.pip/pip/lib/python3.8/site-packages/gunicorn/arbiter.py", line 342, in halt self.stop() File "/layers/google.python.pip/pip/lib/python3.8/site-packages/gunicorn/arbiter.py", line 393, in stop time.sleep(0.1) File "/layers/google.python.pip/pip/lib/python3.8/site-packages/gunicorn/arbiter.py", line 242, in handle_chld self.reap_workers() File "/layers/google.python.pip/pip/lib/python3.8/site-packages/gunicorn/arbiter.py", line 525, in reap_workers raise HaltServer(reason, self.WORKER_BOOT_ERROR) gunicorn.errors.HaltServer:

Here's my app.yaml file:

runtime: python38
service: webapp

handlers:

# site root -> app
- url: /
  static_files: dist/index.html
  upload: dist/index.html
  expiration: "0m"
  secure: always

# urls with no dot in them -> app
- url: /([^.] ?)\/?$  # urls
  static_files: dist/index.html
  upload: dist/index.html
  expiration: "0m"
  secure: always

# everything else
- url: /(.*)
  static_files: dist/\1
  upload: dist/(.*)
  expiration: "0m"
  secure: always

CodePudding user response:

Note that you are using Python 3.8 as per your app.yaml file, and the document you have shared is for Python 2.7. As Python 2 is no longer supported, migrating from Python 2 to Python 3 runtime will help you remove the error.

The documentation here will help you to migrate to Python 3 standard runtime.

CodePudding user response:

This error only happened on Nov 17th and has since not happened again, without any changes by me. Perhaps it was related to something under-the-hood on google app engine servers.

  • Related