""" Gunicorn webserver configuration """ import multiprocessing from slz_api_service.const import SERVICE_PORT bind = f'0.0.0.0:{SERVICE_PORT}' capture_output = True graceful_timeout = 60 # 60 seconds keepalive = 60 * 5 # 5 minutes preload = True reload = True # Set the SO_REUSEPORT flag on the listening socket. reuse_port = True timeout = 60 * 2 # 2 minutes workers = multiprocessing.cpu_count() * 2 + 1