2012-07-20 19:48:18 -07:00
|
|
|
import psutil
|
2011-02-09 15:45:41 -05:00
|
|
|
|
2012-07-20 19:48:18 -07:00
|
|
|
GIGS_OF_MEMORY = psutil.TOTAL_PHYMEM/1024/1024/1024.
|
2012-07-20 19:50:11 -07:00
|
|
|
NUM_CPUS = psutil.NUM_CPUS
|
2011-02-09 15:45:41 -05:00
|
|
|
|
|
|
|
bind = "127.0.0.1:8000"
|
2011-03-19 19:24:14 -04:00
|
|
|
pidfile = "/home/sclay/newsblur/logs/gunicorn.pid"
|
2011-10-19 08:58:51 -07:00
|
|
|
logfile = "/home/sclay/newsblur/logs/production.log"
|
2011-11-22 12:08:18 -05:00
|
|
|
accesslog = "/home/sclay/newsblur/logs/production.log"
|
|
|
|
errorlog = "/home/sclay/newsblur/logs/errors.log"
|
2011-02-09 15:45:41 -05:00
|
|
|
loglevel = "debug"
|
|
|
|
name = "newsblur"
|
2012-01-08 20:47:34 -08:00
|
|
|
timeout = 120
|
2011-10-05 10:10:30 -07:00
|
|
|
max_requests = 1000
|
2012-07-20 19:50:11 -07:00
|
|
|
if GIGS_OF_MEMORY > NUM_CPUS:
|
|
|
|
workers = NUM_CPUS
|
2012-07-20 19:48:18 -07:00
|
|
|
else:
|
2012-07-20 19:50:11 -07:00
|
|
|
workers = int(NUM_CPUS / 2)
|