Gunicorn - MappingSystem/Tutorial-Buka-Toko GitHub Wiki

Table of Contents

Arsitektur

App Engine

Penskalaan

Kelola Instance

Via app.yaml

instance_class: F2
entrypoint: gunicorn -b :$PORT saleor.wsgi --timeout 120

automatic_scaling:
  max_instances: 1

Kasus Memory

2019-04-10 05:14:39.799 ICT
While handling this request, the process that handled this request was found to be using 
too much memory and was terminated. This is likely to cause a new process to be used for 
the next request to your application. If you see this message frequently, you may have a 
memory leak in your application or may be using an instance with insufficient memory. 
Consider setting a larger instance class in app.yaml.

2019-04-10 05:14:39.798 ICT
Exceeded soft memory limit of 256 MB with 312 MB after servicing 88 requests total. 
Consider setting a larger instance class in app.yaml.

opsi

entrypoint: gunicorn -b :$PORT saleor.wsgi --timeout 120 --threads 2 --log-level debug 
--worker-class gthread --workers $((2 * $(getconf _NPROCESSORS_ONLN) + 1))

Kasus Performance

Referensi

  • https://gunicorn.org/
  • https://pypi.org/project/gunicorn/
  • https://github.com/benoitc/gunicorn
  • http://docs.gunicorn.org/en/stable/run.html
  • https://blog.gevent.org/2010/02/27/why-gevent/
  • http://rahmonov.me/posts/run-a-django-app-with-gunicorn-in-ubuntu-16-04/
  • Benchmark uWSGI vs gunicorn for async workers
⚠️ **GitHub.com Fallback** ⚠️