AIprojects / gunicorn_conf.py
sayanAIAI's picture
Create gunicorn_conf.py
66fc484 verified
raw
history blame
369 Bytes
# gunicorn_conf.py
workers = 2 # adjust based on CPU cores; 1-4 typical for Spaces
threads = 4 # use threads to avoid blocking other requests
worker_class = "gthread" # threaded worker is more tolerant of blocking ops
timeout = 120 # worker timeout in seconds (increase from default 30)
graceful_timeout = 120
keepalive = 5