.. _installation_guide/deploy/gunicorn.py: Il file gunicorn.py =================== Il file gunicorn.py viene creato in automatico da :ref:`deploybuilder` e si trova nella cartella di configurazione del sito. Un tipico file è così composto:: bind = 'unix:/home/ubuntu/gitrepos/genropynet/projects/genropynet/sites/genropynet/sockets/gunicorn.sock' pidfile = '/home/ubuntu/gitrepos/genropynet/projects/genropynet/sites/genropynet/genropynet_pid' daemon = False accesslog = '/home/ubuntu/gitrepos/genropynet/projects/genropynet/sites/genropynet/logs/access.log' errorlog = '/home/ubuntu/gitrepos/genropynet/projects/genropynet/sites/genropynet/logs/error.log' logfile = '/home/ubuntu/gitrepos/genropynet/projects/genropynet/sites/genropynet/logs/main.log' workers = 5 loglevel = 'error' chdir = '/home/ubuntu/gitrepos/genropynet/projects/genropynet/sites/genropynet' reload = False capture_output = True worker_class = 'gevent' max_requests = 300 max_requests_jitter = 50 timeout = 1800 graceful_timeout = 600 I parametri che possiamo modificare sono: - **worker**: quanti processi vogliamo utilizzare per servire il sito - **max_requests**: il numero di richieste servite prima che un processo si riavvii automaticamente - **max_requests_jitter**: modifica per ogni processo il valore del parametro precedente con un numero casuale compreso tra 0 e il valore impostato