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"