Previously the local uwsgi server mode was using uwsgi in http mode.
This was unessecary and actually not recommend by the uwsgi docs [1][2]
This is because http mode starts a frontend http process that forwards
requests to the workers running the python code. This is done for the
largely the same reasons we're using apache as a proxy and is
unnecessary. http-socket mode doesn't do this and just exposes the
workers as an http interface to the proxy. (in our case apache)
[1] http://uwsgi-docs.readthedocs.io/en/latest/HTTP.html#http-sockets
[2] http://uwsgi-docs.readthedocs.io/en/latest/ThingsToKnow.html
Change-Id: I5671687c8083fa4bdee066c07b083a0f00be532b
| ... | ... |
@@ -301,7 +301,7 @@ function write_local_uwsgi_http_config {
|
| 301 | 301 |
rm -rf $file |
| 302 | 302 |
iniset "$file" uwsgi wsgi-file "$wsgi" |
| 303 | 303 |
port=$(get_random_port) |
| 304 |
- iniset "$file" uwsgi http "127.0.0.1:$port" |
|
| 304 |
+ iniset "$file" uwsgi http-socket "127.0.0.1:$port" |
|
| 305 | 305 |
iniset "$file" uwsgi processes $API_WORKERS |
| 306 | 306 |
# This is running standalone |
| 307 | 307 |
iniset "$file" uwsgi master true |