2

I have a pyramid application and I wanted to serve it using gunicorn instead of the default waitress. But the biggest problem I have is that there is not enough documentation on the subject anywhere.

Here is what I would like on my dev machine

  1. Use pserve to serve the app on my machine because it comes with code reload on change in code
  2. Configure ini files to have 8 threads of gunicorn because we have the same thing on server

I have the config like this now:

[server:main]
use = egg:gunicorn#main
host = 127.0.0.1
port = 6543
proc_name = mvc_gunicorn
pidfile = mvc_gunicorn.pid
errorlog = mvc_error.log
accesslog = mvc_access.log
workers = 8

It works great except

  1. But the annoying access log gets to the console. How can I avoid that?
  2. The code reload does not work because threads do not die immediately. I have to start it manually myself. Can reload on pserve me made to wait a bit or can the threads in gunicorn die fast?

On a related note is there a place where I can find all the params that can be used in INI file to configure gunicorn?

Ranjith Ramachandra
  • 10,399
  • 14
  • 59
  • 96

0 Answers0