File size: 576 Bytes
5ea344f 4ca437f 5ea344f 4ca437f 5ea344f 4ca437f 5ea344f 4ca437f 5ea344f 4ca437f 5ea344f 4ca437f 5ea344f |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
import multiprocessing
# --- Server Socket ---
bind = "0.0.0.0:8000"
# --- Worker Processes ---
# Dynamically calculate based on CPU count
workers = multiprocessing.cpu_count() * 2 + 1
# For async FastAPI apps
worker_class = "uvicorn.workers.UvicornWorker"
# Use a high but safe connection limit
worker_connections = 100000
# Disable forced restarts (optional, not recommended for memory-leaky apps)
max_requests = 0
max_requests_jitter = 0
# --- Logging ---
loglevel = "info"
accesslog = "-"
errorlog = "-"
# --- Process Naming ---
proc_name = "fastapi_reverse_proxy"
|