From fc3e5a678fcbb9eddffc0d3c248ea4f523850929 Mon Sep 17 00:00:00 2001 From: shahzeydyfah Date: Thu, 15 Feb 2024 21:49:38 +0330 Subject: [PATCH] add gunicorn --- gunicorn.py | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 gunicorn.py diff --git a/gunicorn.py b/gunicorn.py new file mode 100644 index 0000000..b755727 --- /dev/null +++ b/gunicorn.py @@ -0,0 +1,23 @@ +import multiprocessing +import os + +name = "sakhteman" + +accesslog = "/home/sakhteman/server_fast_api/gunicorn-access.log" +errorlog = "/home/sakhteman/server_fast_api/gunicorn-error.log" + + +bind = "0.0.0.0:8082" + +worker_class = "uvicorn.workers.UvicornWorker" +workers = 5 +worker_connections = 1024 +backlog = 2048 +max_requests = 5120 +timeout = 120 +keepalive = 2 + +debug = os.environ.get("debug", "false") == "true" +reload = debug +preload_app = False +daemon = False \ No newline at end of file