MargeCode42 / gunicorn_config.py
ancerlop's picture
Fix Error Time Out
1abd012 verified
raw
history blame contribute delete
526 Bytes
# Gunicorn configuration file
import multiprocessing
# Server socket
bind = "0.0.0.0:5000"
# Worker processes
workers = 2
worker_class = "sync"
threads = 2
# Timeout settings
timeout = 120
keepalive = 2
# Server mechanics
preload_app = True
# Logging
accesslog = "-"
errorlog = "-"
loglevel = "info"
# Health check settings
def on_starting(server):
print("Gunicorn server is starting up...")
def when_ready(server):
print("Gunicorn server is ready. Health check should now respond.")