| 1 | [uwsgi] |
| 2 | ############################ |
| 3 | ### Generic UWSGI config ### |
| 4 | ############################ |
| 5 | |
| 6 | # Override the default size for headers from the 4k default. |
| 7 | buffer-size = 65535 |
| 8 | |
| 9 | # This avoids error 104: "Connection reset by peer" |
| 10 | #rem-header = Content-Length |
| 11 | |
| 12 | # This is running standalone |
| 13 | master = true |
| 14 | |
| 15 | # uwsgi recommends this to prevent thundering herd on accept. |
| 16 | thunder-lock = true |
| 17 | |
| 18 | plugins = python3 |
| 19 | |
| 20 | # This ensures that file descriptors aren't shared between the WSGI application processes. |
| 21 | lazy-apps = true |
| 22 | |
| 23 | # Log from the wsgi application: needs python3-pastescript as runtime depends. |
| 24 | paste-logger = true |
| 25 | |
| 26 | # automatically kill workers if master dies |
| 27 | no-orphans = true |
| 28 | |
| 29 | # exit instead of brutal reload on SIGTERM |
| 30 | die-on-term = true |
| 31 | |
| 32 | # Avoid memcached connections to remain opened |
| 33 | close-on-exec = true |
| 34 | close-on-exec2 = true |
| 35 | |
| 36 | ########################## |
| 37 | ### Performance tuning ### |
| 38 | ########################## |
| 39 | # Threads and processes |
| 40 | enable-threads = true |
| 41 | |
| 42 | # For max perf, set this to number of core*2 |
| 43 | processes = 8 |
| 44 | |
| 45 | # This was benchmarked as a good value |
| 46 | threads = 32 |
| 47 | |
| 48 | # This is the number of sockets in the queue. |
| 49 | # It improves a lot performances. This is comparable |
| 50 | # to the Apache ServerLimit/MaxClients option. |
| 51 | listen = 100 |
| 52 | |
| 53 | ################################## |
| 54 | ### OpenStack service specific ### |
| 55 | ################################## |
| 56 | env = OS_OSLO_MESSAGING_RABBIT__PROCESSNAME=cyborg-api |
| 57 | |
| 58 | # This is needed, otherwise connections stay open |
| 59 | add-header = Connection: close |
| 60 | |
| 61 | # Important stuff... |
| 62 | paste = config:/etc/cyborg/api-paste.ini |
| 63 | |
| 64 | # This is the standard port for the WSGI application, listening on all available IPs |
| 65 | logto = /var/log/cyborg/cyborg-api.log |
| 66 | name = cyborg-api |
| 67 | uid = cyborg |
| 68 | gid = cyborg |
| 69 | chdir = /var/lib/cyborg |
| 70 | module = cyborg.wsgi.api:application |
| 71 | |
| 72 | # This is controled by the init script using the --http-socket |
| 73 | # or using the --https thing. https will be activated if a file |
| 74 | # /etc/cyborg/ssl/private/*.pem is found. In both case, port 8889 |
| 75 | # on all IPs will be used. |
| 76 | # The partern to search for the private key file is: |
| 77 | # find /etc/cyborg/ssl/private -type f -iname '*.pem' | head -n 1 |
| 78 | # and for the certificate: |
| 79 | # find /etc/cyborg/ssl/private -type f -iname '*.crt' | head -n 1 |
| 80 | # just drop files there and restart the daemon, and you'll have |
| 81 | # SSL up and running. |
| 82 | #http-socket = [::]:6666 |
| 83 | #https-socket = [::]:6666,foobar.crt,foobar.key |