hostinger-django-demo/deploy/gunicorn.conf.py
thecyberlearn 2f3f1ea867 Initial commit: Django demo project for VPS deployment
🎉 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-29 21:50:08 +05:30

35 lines
747 B
Python

"""Gunicorn configuration for production deployment"""
import multiprocessing
import os
# Server socket
bind = "127.0.0.1:8000"
backlog = 2048
# Worker processes
workers = multiprocessing.cpu_count() * 2 + 1
worker_class = "sync"
worker_connections = 1000
timeout = 30
keepalive = 2
max_requests = 1000
max_requests_jitter = 100
# Restart workers after this many requests, with up to max_requests_jitter additional requests
preload_app = True
# Logging
accesslog = "/var/log/django/access.log"
errorlog = "/var/log/django/error.log"
loglevel = "info"
# Process naming
proc_name = "django_demo_project"
# Server mechanics
daemon = False
pidfile = "/var/run/gunicorn/django_demo.pid"
user = "www-data"
group = "www-data"
tmp_upload_dir = None