Closed mojowen closed 7 years ago
@mojowen What settings are you using for gunicorn?
Try set "max_requests" http://docs.gunicorn.org/en/stable/settings.html
We ended up removing Nginx and moving our assets into a CDN. But for anyone else encountering this issue - here's what my gunicorn.conf
looked like:
import multiprocessing
def pre_fork(server, worker):
f = '/tmp/app-initialized'
open(f, 'w').close()
bind = 'unix:///tmp/nginx.socket'
workers = multiprocessing.cpu_count() * 2 + 1
And my Procfile:
web: bin/start-nginx gunicorn -c gunicorn.conf app_name.wsgi
I've got this running alongside Gunicorn and Django on a Heroku 2X dyno and I'm seeing a bunch of memory warnings and what not. Didn't change anything except add the buildpack and the Procfile.
Anyway to manage the nginx memory usage? Thanks