Switch local http uwsgi conf to http-socket mode

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
This commit is contained in:
Matthew Treinish 2017-06-30 12:15:26 -04:00
parent 3415521d56
commit 1560efe9c9
No known key found for this signature in database
GPG Key ID: FD12A0F214C9E177
1 changed files with 1 additions and 1 deletions

View File

@ -301,7 +301,7 @@ function write_local_uwsgi_http_config {
rm -rf $file
iniset "$file" uwsgi wsgi-file "$wsgi"
port=$(get_random_port)
iniset "$file" uwsgi http "127.0.0.1:$port"
iniset "$file" uwsgi http-socket "127.0.0.1:$port"
iniset "$file" uwsgi processes $API_WORKERS
# This is running standalone
iniset "$file" uwsgi master true