MargeCode / gunicorn_config.py
ancerlop's picture
Fix Error not start
51b0147 verified
raw
history blame
589 Bytes
# Gunicorn configuration file
import multiprocessing
# Server socket
bind = "0.0.0.0:5000"
# Worker processes
workers = 1
worker_class = "gthread" # Cambiado de gevent a gthread para coincidir con los logs
threads = 4
# Timeout settings
timeout = 300
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.")