mirror of
https://github.com/khoaliber/khoj.git
synced 2026-03-02 13:18:18 +00:00
Increase timeout to 180 (from 120s previous) and graceful timeout to 90 (from 30s default) to reduce Increase default gunicorn workers and make it configurable to better utilize (v)CPUs. This is manually configured (instead of using multiprocessing.cpu_count()) as VMs/containers may read cpu count of host machine instead of their VMs/containers.
18 lines
452 B
Python
18 lines
452 B
Python
import os
|
|
|
|
bind = "0.0.0.0:42110"
|
|
|
|
# Worker Configuration
|
|
workers = int(os.environ.get("GUNICORN_WORKERS", 6))
|
|
worker_class = "uvicorn.workers.UvicornWorker"
|
|
|
|
# Worker Timeout Configuration
|
|
timeout = int(os.environ.get("GUNICORN_TIMEOUT", 180))
|
|
graceful_timeout = int(os.environ.get("GUNICORN_GRACEFUL_TIMEOUT", 90))
|
|
keep_alive = int(os.environ.get("GUNICORN_KEEP_ALIVE", 60))
|
|
|
|
# Logging Configuration
|
|
accesslog = "-"
|
|
errorlog = "-"
|
|
loglevel = "debug"
|